diff options
author | M.Gergo | 2020-03-23 01:17:58 +0100 |
---|---|---|
committer | M.Gergo | 2020-03-23 01:17:58 +0100 |
commit | 31bf036be3be01ef7b3bbc9dc08813f0740dab9a (patch) | |
tree | f149b4cd7ee31e5e85b20e9b2e6317af6e7ae465 /mayor-orig/mayor-naplo/update | |
parent | a7992b5395dab0da64527b8cc6357709196663d2 (diff) | |
download | mayor-rev4630.tar.gz mayor-rev4630.zip |
Rev: 4630rev4630
Diffstat (limited to 'mayor-orig/mayor-naplo/update')
-rw-r--r-- | mayor-orig/mayor-naplo/update/pre004627-1-naplo.sql | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mayor-orig/mayor-naplo/update/pre004627-1-naplo.sql b/mayor-orig/mayor-naplo/update/pre004627-1-naplo.sql new file mode 100644 index 00000000..ba6686cd --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004627-1-naplo.sql @@ -0,0 +1,29 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4627 $$ + +CREATE PROCEDURE upgrade_database_4627() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +IF NOT EXISTS ( + SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='oraHazifeladatDiak' +) THEN + +CREATE TABLE `oraHazifeladatDiak` ( + `hazifeladatId` int(10) unsigned DEFAULT NULL, + `diakId` int(10) unsigned DEFAULT NULL, + `diakLattamDt` datetime DEFAULT NULL, + `tanarLattamDt` datetime DEFAULT NULL, + `hazifeladatDiakStatus` ENUM('','kész') DEFAULT '', + `hazifeladatDiakMegjegyzes` varchar(255) COLLATE utf8_hungarian_ci NOT NULL, + PRIMARY KEY (`hazifeladatId`,`diakId`), + UNIQUE KEY `oraHazifeladatDiak_UK` (`hazifeladatId`,`diakId`), + CONSTRAINT `oraHazifeladatDiak_ibfk_1` FOREIGN KEY (`hazifeladatId`) REFERENCES `oraHazifeladat` (`hazifeladatId`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `oraHazifeladatDiak_ibfk_2` FOREIGN KEY (`diakId`) REFERENCES %INTEZMENYDB%.`diak` (`diakId`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +END IF; + +END $$ +DELIMITER ; +CALL upgrade_database_4627(); |