Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
ApartVW/reserv.sql
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
26 lines (25 sloc)
1.21 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS `reserv`; | |
CREATE TABLE `reserv` ( | |
`r_ID` smallint(6) NOT NULL AUTO_INCREMENT, | |
`g_ID` smallint(6) NOT NULL, | |
`p_ID` smallint(6) NOT NULL, | |
`von_dat` datetime NOT NULL, | |
`bis_dat` datetime NOT NULL, | |
`r_anzp` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'max(p_anzp) <= r_anzp', | |
`resv_status` enum('vorreserviert','bestätigt','storniert') DEFAULT NULL, | |
`rechn_status` enum('erstellt','bezahlt') DEFAULT NULL, | |
`rechn_dat` datetime DEFAULT NULL, | |
`anf_persknr` int(11) DEFAULT NULL COMMENT 'Anforderer', | |
`anf_name` varchar(100) DEFAULT NULL, | |
`betr_persknr` int(11) DEFAULT NULL COMMENT 'Betreuer', | |
`aufschlag` double DEFAULT '0', | |
`telefon_kost` double DEFAULT '0', | |
`kst` varchar(10) DEFAULT NULL COMMENT 'Kostenübernahme auf KST', | |
`r_bem` varchar(100) DEFAULT NULL, | |
PRIMARY KEY (`r_ID`), | |
KEY `fk_reserv_gast_idx` (`g_ID`), | |
KEY `fk_reserv_apt_preis_idx` (`p_ID`), | |
KEY `fk_reserv_kst_abt_idx` (`kst`), | |
CONSTRAINT `fk_reserv_apt_preis` FOREIGN KEY (`p_ID`) REFERENCES `apt_preis` (`p_ID`) ON DELETE CASCADE ON UPDATE CASCADE, | |
CONSTRAINT `fk_reserv_gast` FOREIGN KEY (`g_ID`) REFERENCES `gast` (`g_ID`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; |