diff options
author | M.Gergo | 2018-07-06 11:14:41 +0200 |
---|---|---|
committer | M.Gergo | 2018-07-06 11:14:41 +0200 |
commit | 43de9af71f7f4ca5731b94a06d688ae8412ba427 (patch) | |
tree | 54835de1dfcda504c02da261f0dc26885aed2e89 /mayor-orig/update/pre003334-1-naplo.sql | |
parent | 50310b0e4513ee3fcce67351ae61e8fff851130e (diff) | |
download | mayor-43de9af71f7f4ca5731b94a06d688ae8412ba427.tar.gz mayor-43de9af71f7f4ca5731b94a06d688ae8412ba427.zip |
2018/Feb/28 -i állapot hozzáadva, mint a módosítások kiindulási állapota
Diffstat (limited to 'mayor-orig/update/pre003334-1-naplo.sql')
-rw-r--r-- | mayor-orig/update/pre003334-1-naplo.sql | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/mayor-orig/update/pre003334-1-naplo.sql b/mayor-orig/update/pre003334-1-naplo.sql new file mode 100644 index 00000000..40806fed --- /dev/null +++ b/mayor-orig/update/pre003334-1-naplo.sql @@ -0,0 +1,44 @@ +CREATE TABLE `esemeny` ( + `esemenyId` int(10) unsigned NOT NULL AUTO_INCREMENT, + `esemenyKategoria` enum('verseny','közösségi szolgálat','iskolai rendezvény'), + `esemenyRovidnev` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL, + `esemenyNev` varchar(255) COLLATE utf8_hungarian_ci DEFAULT NULL, + `esemenyLeiras` text COLLATE utf8_hungarian_ci DEFAULT NULL, + `jelentkezesTolDt` datetime NOT NULL, + `jelentkezesIgDt` datetime NOT NULL, + `min` tinyint(3) unsigned NOT NULL, + `max` tinyint(3) unsigned NOT NULL, + PRIMARY KEY (`esemenyId`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci ; + +CREATE TABLE `esemenyOsztaly` ( + `esemenyId` int(10) unsigned NOT NULL, + `osztalyId` int(10) unsigned NOT NULL, + PRIMARY KEY (`esemenyId`,`osztalyId`), + KEY `esemenyOsztaly_FKIndex1` (`esemenyId`), + KEY `esemenyOsztaly_FKIndex2` (`osztalyId`), + CONSTRAINT `esemenyOsztaly_ibfk_1` FOREIGN KEY (`esemenyId`) REFERENCES `esemeny` (`esemenyId`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `esemenyOsztaly_ibfk_2` FOREIGN KEY (`osztalyId`) REFERENCES `%INTEZMENYDB%`.`osztaly` (`osztalyId`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +CREATE TABLE `esemenyDiak` ( + `esemenyId` int(10) unsigned NOT NULL, + `diakId` int(10) unsigned NOT NULL, + `jelentkezesDt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `jovahagyasDt` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`esemenyId`,`diakId`), + KEY `esemenyDiak_esemenyId` (`esemenyId`), + KEY `esemenyDiak_diakId` (`diakId`), + CONSTRAINT `esemenyDiak_ibfk_1` FOREIGN KEY (`esemenyId`) REFERENCES `esemeny` (`esemenyId`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `esemenyDiak_ibfk_2` FOREIGN KEY (`diakId`) REFERENCES `%INTEZMENYDB%`.`diak` (`diakId`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci ; + +CREATE TABLE `esemenyTanar` ( + `esemenyId` int(10) unsigned NOT NULL, + `tanarId` int(10) unsigned NOT NULL, + PRIMARY KEY (`esemenyId`,`tanarId`), + KEY `esemenyTanar_FKIndex1` (`esemenyId`), + KEY `esemenyTanar_FKIndex2` (`tanarId`), + CONSTRAINT `esemenyTanar_ibfk_1` FOREIGN KEY (`esemenyId`) REFERENCES `esemeny` (`esemenyId`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `esemenyTanar_ibfk_2` FOREIGN KEY (`tanarId`) REFERENCES `%INTEZMENYDB%`.`tanar` (`tanarId`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; |