From 8f8fc390374681cd537e4216f0366d6fe8a6c73c Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Fri, 7 Sep 2018 22:27:52 +0200 Subject: Rev: 4358 --- mayor-orig/update/pre004350-1-naplo.sql | 15 +++++++++++++++ mayor-orig/update/pre004356-1-mayor_login.sql | 21 +++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 mayor-orig/update/pre004350-1-naplo.sql create mode 100644 mayor-orig/update/pre004356-1-mayor_login.sql (limited to 'mayor-orig/update') diff --git a/mayor-orig/update/pre004350-1-naplo.sql b/mayor-orig/update/pre004350-1-naplo.sql new file mode 100644 index 00000000..c7144b3d --- /dev/null +++ b/mayor-orig/update/pre004350-1-naplo.sql @@ -0,0 +1,15 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4329 $$ + +CREATE PROCEDURE upgrade_database_4329() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +ALTER TABLE `hianyzas` MODIFY `igazolas` enum('orvosi','szülői','osztályfőnöki','verseny','tanulmányi verseny','vizsga','nyelvvizsga','igazgatói','hatósági','pályaválasztás','') COLLATE utf8_hungarian_ci DEFAULT NULL; +UPDATE hianyzas SET igazolas='verseny' WHERE igazolas='tanulmányi verseny'; +UPDATE hianyzas SET igazolas='vizsga' WHERE igazolas='nyelvvizsga'; +ALTER TABLE hianyzas MODIFY `igazolas` enum('orvosi','szülői','osztályfőnöki','verseny','vizsga','igazgatói','hatósági','pályaválasztás','') COLLATE utf8_hungarian_ci DEFAULT NULL; + +END $$ +DELIMITER ; +CALL upgrade_database_4329(); diff --git a/mayor-orig/update/pre004356-1-mayor_login.sql b/mayor-orig/update/pre004356-1-mayor_login.sql new file mode 100644 index 00000000..8a8a5440 --- /dev/null +++ b/mayor-orig/update/pre004356-1-mayor_login.sql @@ -0,0 +1,21 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4356 $$ +CREATE PROCEDURE upgrade_database_4356() +BEGIN + IF NOT EXISTS ( + SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='eduroam' + ) THEN + +CREATE TABLE `eduroam` ( + `userAccount` varchar(64) COLLATE utf8_hungarian_ci NOT NULL, + `policy` enum('public','parent','private') COLLATE utf8_hungarian_ci DEFAULT NULL, + `eduroamUID` varchar(32) COLLATE utf8_hungarian_ci NOT NULL, + `eduroamPASSWORD` varchar(128) COLLATE utf8_hungarian_ci NOT NULL, + `eduroamAFFILIATION` ENUM ('staff','faculty','student','') DEFAULT '', + `modositasDt` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +END IF; +END $$ +DELIMITER ; $$ +CALL upgrade_database_4356(); -- cgit v1.2.3