diff options
author | M.Gergo | 2020-03-16 23:29:28 +0100 |
---|---|---|
committer | M.Gergo | 2020-03-16 23:29:28 +0100 |
commit | c3cbdd8305d2c46a6a18fc4f1fcc3a3f3f127029 (patch) | |
tree | 0381667179713a267488512d43795e3c77efb191 /mayor-orig/mayor-naplo/update | |
parent | 6cdef5739ed7e029d4631b849f157462e64bd045 (diff) | |
download | mayor-c3cbdd8305d2c46a6a18fc4f1fcc3a3f3f127029.tar.gz mayor-c3cbdd8305d2c46a6a18fc4f1fcc3a3f3f127029.zip |
Rev: 4620rev4620
Diffstat (limited to 'mayor-orig/mayor-naplo/update')
-rw-r--r-- | mayor-orig/mayor-naplo/update/pre004616-1-naplo.sql | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mayor-orig/mayor-naplo/update/pre004616-1-naplo.sql b/mayor-orig/mayor-naplo/update/pre004616-1-naplo.sql new file mode 100644 index 00000000..d1aa055d --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004616-1-naplo.sql @@ -0,0 +1,25 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4616 $$ + +CREATE PROCEDURE upgrade_database_4616() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +IF NOT EXISTS ( + SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='oraHazifeladat' +) THEN + +CREATE TABLE `oraHazifeladat` ( + `hazifeladatId` int(10) unsigned NOT NULL AUTO_INCREMENT, + `oraId` int(10) unsigned DEFAULT NULL, + `hazifeladatLeiras` text COLLATE utf8_hungarian_ci NOT NULL, + PRIMARY KEY (`hazifeladatId`), + UNIQUE KEY `oraId` (`oraId`), + CONSTRAINT `oraHazifeladat_ibfk_1` FOREIGN KEY (`oraId`) REFERENCES `ora` (`oraId`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +END IF; + +END $$ +DELIMITER ; +CALL upgrade_database_4616(); |