diff options
Diffstat (limited to 'mayor-orig/mayor-naplo/update')
18 files changed, 420 insertions, 0 deletions
diff --git a/mayor-orig/mayor-naplo/update/pre004721-1-intezmeny.sql b/mayor-orig/mayor-naplo/update/pre004721-1-intezmeny.sql new file mode 100644 index 00000000..581c58de --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004721-1-intezmeny.sql @@ -0,0 +1,13 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4721 $$ + +CREATE PROCEDURE upgrade_database_4721() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='tanar' and COLUMN_NAME='elerhetoseg') THEN + ALTER TABLE `tanar` ADD `elerhetoseg` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL; +END IF; +END $$ +DELIMITER ; +CALL upgrade_database_4721(); diff --git a/mayor-orig/mayor-naplo/update/pre004722-1-naplo.sql b/mayor-orig/mayor-naplo/update/pre004722-1-naplo.sql new file mode 100644 index 00000000..f09f8f4f --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004722-1-naplo.sql @@ -0,0 +1,98 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4722 $$ + +CREATE PROCEDURE upgrade_database_4722() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +IF NOT EXISTS ( + SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='felveteli' +) THEN +CREATE TABLE `felveteli` ( + `oId` bigint(20) NOT NULL, + `nev` varchar(50) COLLATE utf8_hungarian_ci DEFAULT NULL, + `jelige` varchar(30) COLLATE utf8_hungarian_ci DEFAULT NULL, + `omkod` varchar(7) CHARACTER SET utf8 DEFAULT NULL, + `szuldt` date DEFAULT NULL, + `fl` enum('fiú','lány') CHARACTER SET utf8 DEFAULT NULL, + `an` varchar(50) CHARACTER SET utf8 DEFAULT NULL, + `lakcim_irsz` varchar(5) CHARACTER SET utf8 DEFAULT NULL, + `lakcim_telepules` varchar(40) CHARACTER SET utf8 DEFAULT NULL, + `lakcim_utcahazszam` varchar(50) CHARACTER SET utf8 DEFAULT NULL, + `tartozkodasi_irsz` varchar(5) CHARACTER SET utf8 DEFAULT NULL, + `tartozkodasi_telepules` varchar(40) CHARACTER SET utf8 DEFAULT NULL, + `tartozkodasi_utcahazszam` varchar(50) CHARACTER SET utf8 DEFAULT NULL, + `atlag` decimal(4,2) DEFAULT NULL, + `jel_tagozat1` smallint(5) unsigned DEFAULT NULL, + `jel_tagozat2` smallint(5) unsigned DEFAULT NULL, + `jel_tagozat3` smallint(5) unsigned DEFAULT NULL, + `jel_tagozat4` smallint(5) unsigned DEFAULT NULL, + `jel_tagozat5` smallint(5) unsigned DEFAULT NULL, + `jel_tagozat6` smallint(5) unsigned DEFAULT NULL, + `magyar` smallint(5) unsigned NOT NULL DEFAULT '0', + `matek` smallint(5) unsigned NOT NULL DEFAULT '0', + `pont` decimal(5,2) DEFAULT NULL, + `evfolyam` ENUM('4','5','6','8','') DEFAULT NULL, + `rangsor` smallint(5) unsigned DEFAULT NULL, + `jelenleg` varchar(50) CHARACTER SET utf8 DEFAULT NULL, + `joslat` varchar(50) CHARACTER SET utf8 DEFAULT NULL, + `vegeredmeny` varchar(40) COLLATE utf8_hungarian_ci DEFAULT NULL, + `level1` enum('nincs értesítve','értesítve') CHARACTER SET utf8 DEFAULT NULL, + `level2` enum('nincs értesítve','nem kell értesíteni','értesítve') CHARACTER SET utf8 DEFAULT NULL, + `extra` varchar(100) COLLATE utf8_hungarian_ci DEFAULT NULL, + `felveteliId` int(10) unsigned NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`felveteliId`), + KEY `indx_fa_oId` (`oId`), + KEY `indx_fa_nev` (`nev`,`oId`), + KEY `indx_fa_jelige` (`jelige`,`oId`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +END IF; +IF NOT EXISTS ( + SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='felveteli_tagozat' +) THEN +CREATE TABLE `felveteli_tagozat` ( + `tagozat` int(11) unsigned NOT NULL, + `tagozatNev` varchar(64) NOT NULL, + `szobeliMegjegyzes` varchar(255) DEFAULT NULL, + `szobeliNelkulAjanlat` varchar(255) DEFAULT NULL, + `szobeliElutasito` varchar(255) DEFAULT NULL, + PRIMARY KEY (`tagozat`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +END IF; + +IF NOT EXISTS ( + SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='felveteli_szobeli' +) THEN +CREATE TABLE `felveteli_szobeli` ( + `felveteliSzobeliId` int(10) unsigned NOT NULL AUTO_INCREMENT, + `oId` bigint(20) NOT NULL, + `szoveg` varchar(128) CHARACTER SET utf8 DEFAULT NULL, + `bizottsag` varchar(10) COLLATE utf8_hungarian_ci DEFAULT NULL, + `nap` varchar(10) CHARACTER SET utf8 DEFAULT NULL, + `napdt` date DEFAULT NULL, + `ido` time DEFAULT NULL, + `tagozat` int(11) unsigned DEFAULT NULL, + `szobeliTipus` enum ('szóbeli','szóbeli nélküli ajánlat','elutasítás') DEFAULT 'szóbeli', + PRIMARY KEY (`felveteliSzobeliId`), + KEY `oId` (`oId`), + CONSTRAINT `felveteli_szobeli_ibfk_1` FOREIGN KEY (`oId`) REFERENCES `felveteli` (`oId`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `felveteli_szobeli_ibfk_2` FOREIGN KEY (`tagozat`) REFERENCES `felveteli_tagozat` (`tagozat`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +END IF; + +IF NOT EXISTS ( + SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='felveteli_jelentkezes' +) THEN +CREATE TABLE `felveteli_jelentkezes` ( + `oId` bigint(20) NOT NULL, + `tagozat` int(11) unsigned DEFAULT NULL, + PRIMARY KEY (`oId`,`tagozat`), + CONSTRAINT `felveteli_jelentkezes_ibfk_1` FOREIGN KEY (`oId`) REFERENCES `felveteli` (`oId`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `felveteli_jelentkezes_ibfk_2` FOREIGN KEY (`tagozat`) REFERENCES `felveteli_tagozat` (`tagozat`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +END IF; + + +END $$ +DELIMITER ; +CALL upgrade_database_4722(); diff --git a/mayor-orig/mayor-naplo/update/pre004722-2-intezmeny.sql b/mayor-orig/mayor-naplo/update/pre004722-2-intezmeny.sql new file mode 100644 index 00000000..795c266c --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004722-2-intezmeny.sql @@ -0,0 +1,12 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4722b $$ + +CREATE PROCEDURE upgrade_database_4722b() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +ALTER TABLE `idoszak` MODIFY `tipus` enum('zárás','bizonyítvány írás','vizsga','előzetes tárgyválasztás','tárgyválasztás','tankörnévsor módosítás','fogadóóra jelentkezés','tanmenet leadás','felvételi szóbeli lekérdezés','felvételi ideiglenes rangsor lekérdezés','felvételi végeredmény lekérdezés') COLLATE utf8_hungarian_ci DEFAULT NULL; + +END $$ +DELIMITER ; +CALL upgrade_database_4722b(); diff --git a/mayor-orig/mayor-naplo/update/pre004725-1-naplo.sql b/mayor-orig/mayor-naplo/update/pre004725-1-naplo.sql new file mode 100644 index 00000000..c9124f12 --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004725-1-naplo.sql @@ -0,0 +1,16 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4725 $$ + +CREATE PROCEDURE upgrade_database_4725() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +IF NOT EXISTS ( + SELECT * FROM information_schema.statistics WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='felveteli' and INDEX_NAME = 'indx_fa_oId2' +) THEN + ALTER TABLE felveteli ADD UNIQUE KEY indx_fa_oId2 (oId); +END IF; + +END $$ +DELIMITER ; +CALL upgrade_database_4725(); diff --git a/mayor-orig/mayor-naplo/update/pre004734-1-naplo.sql b/mayor-orig/mayor-naplo/update/pre004734-1-naplo.sql new file mode 100644 index 00000000..a0bc8010 --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004734-1-naplo.sql @@ -0,0 +1,16 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4734 $$ + +CREATE PROCEDURE upgrade_database_4734() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +IF NOT EXISTS ( + SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='felveteli_szobeli' and COLUMN_NAME='szobelipont' +) THEN + ALTER TABLE felveteli_szobeli ADD szobelipont tinyint UNSIGNED DEFAULT NULL; +END IF; + +END $$ +DELIMITER ; +CALL upgrade_database_4734(); diff --git a/mayor-orig/mayor-naplo/update/pre004735-1-intezmeny.sql b/mayor-orig/mayor-naplo/update/pre004735-1-intezmeny.sql new file mode 100644 index 00000000..02fb5bf5 --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004735-1-intezmeny.sql @@ -0,0 +1,24 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4735 $$ + +CREATE PROCEDURE upgrade_database_4735() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +IF NOT EXISTS (SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='dokumentum') THEN +CREATE TABLE `dokumentum` ( + `dokumentumId` int(10) unsigned NOT NULL AUTO_INCREMENT, + `dokumentumLeiras` varchar(511) NOT NULL, + `dokumentumRovidLeiras` varchar(255) NOT NULL, + `dokumentumUrl` varchar(1023) COLLATE utf8_hungarian_ci DEFAULT NULL, + `dokumentumMegjegyzes` varchar(63) NOT NULL, + `dokumentumSorrend` SMALLINT DEFAULT 1, + `dokumentumDt` datetime DEFAULT NULL, + PRIMARY KEY (`dokumentumId`), + INDEX (`dokumentumSorrend`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +END IF; + +END $$ +DELIMITER ; +CALL upgrade_database_4735(); diff --git a/mayor-orig/mayor-naplo/update/pre004736-1-intezmeny.sql b/mayor-orig/mayor-naplo/update/pre004736-1-intezmeny.sql new file mode 100644 index 00000000..4614cfc8 --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004736-1-intezmeny.sql @@ -0,0 +1,18 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4736 $$ + +CREATE PROCEDURE upgrade_database_4736() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='dokumentum' AND COLUMN_NAME='dokumentumPolicy') THEN +ALTER TABLE `dokumentum` ADD dokumentumPolicy ENUM('public','parent','private'); +END IF; + +IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='dokumentum' AND COLUMN_NAME='dokumentumTipus') THEN +ALTER TABLE `dokumentum` ADD dokumentumTipus ENUM('general','tanev'); +END IF; + +END $$ +DELIMITER ; +CALL upgrade_database_4736(); diff --git a/mayor-orig/mayor-naplo/update/pre004737-1-naplo.sql b/mayor-orig/mayor-naplo/update/pre004737-1-naplo.sql new file mode 100644 index 00000000..dbcf23c2 --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004737-1-naplo.sql @@ -0,0 +1,18 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4737 $$ + +CREATE PROCEDURE upgrade_database_4737() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +IF NOT EXISTS ( + SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='felveteli_jelentkezes' and COLUMN_NAME='ideiglenesRangsor' +) THEN + ALTER TABLE felveteli_jelentkezes ADD ideiglenesRangsor mediumint unsigned not null; +END IF; +ALTER TABLE felveteli MODIFY joslat varchar(250); + + +END $$ +DELIMITER ; +CALL upgrade_database_4737(); diff --git a/mayor-orig/mayor-naplo/update/pre004742-1-intezmeny.sql b/mayor-orig/mayor-naplo/update/pre004742-1-intezmeny.sql new file mode 100644 index 00000000..4ef93a68 --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004742-1-intezmeny.sql @@ -0,0 +1,12 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4742 $$ + +CREATE PROCEDURE upgrade_database_4742() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +ALTER TABLE `dokumentum` MODIFY `dokumentumDt` datetime DEFAULT NULL; + +END $$ +DELIMITER ; +CALL upgrade_database_4742(); diff --git a/mayor-orig/mayor-naplo/update/pre004772-1-naplo.sql b/mayor-orig/mayor-naplo/update/pre004772-1-naplo.sql new file mode 100644 index 00000000..c0160e45 --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004772-1-naplo.sql @@ -0,0 +1,29 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4772 $$ + +CREATE PROCEDURE upgrade_database_4772() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +IF NOT EXISTS ( + SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='felveteli_levelLog' +) THEN + +CREATE TABLE `felveteli_levelLog` ( + `oId` bigint(20) NOT NULL, + `generalasDt` datetime DEFAULT NULL, + `ip` varchar(32) COLLATE utf8_hungarian_ci DEFAULT NULL, + `token` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL, + `letoltesDt` datetime DEFAULT NULL, + KEY `IDX_levelLog_oId` (`oId`), + CONSTRAINT `felveteli_levelLog_ibfk_1` FOREIGN KEY (`oId`) REFERENCES `felveteli` (`oId`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +END IF; + +alter table felveteli modify `vegeredmeny` varchar(60) COLLATE utf8_hungarian_ci DEFAULT NULL; + + +END $$ +DELIMITER ; +CALL upgrade_database_4772(); diff --git a/mayor-orig/mayor-naplo/update/pre004772-2.sh b/mayor-orig/mayor-naplo/update/pre004772-2.sh new file mode 100644 index 00000000..cc03ecba --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004772-2.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +#BASEDIR="/var/mayor" + +DIR="$BASEDIR/download/private/naplo/felveteli/level/" +mkdir -p $DIR +chown -R www-data $DIR +echo "$DIR Kész." + +DIR="$BASEDIR/download/public/naplo/felveteli/level/" +mkdir -p $DIR +chown -R www-data $DIR +echo "$DIR Kész." diff --git a/mayor-orig/mayor-naplo/update/pre004775-1-naplo.sql b/mayor-orig/mayor-naplo/update/pre004775-1-naplo.sql new file mode 100644 index 00000000..b6bb34f9 --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004775-1-naplo.sql @@ -0,0 +1,27 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4775 $$ + +CREATE PROCEDURE upgrade_database_4775() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +IF NOT EXISTS ( + SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='felveteli_iskolak' +) THEN + +CREATE TABLE `felveteli_iskolak` ( + `omkod` varchar(7) CHARACTER SET utf8 DEFAULT NULL, + `iskolaNev` varchar(128) COLLATE utf8_hungarian_ci DEFAULT NULL, + `iskolaIrsz` varchar(10) COLLATE utf8_hungarian_ci DEFAULT NULL, + `iskolaCim` varchar(128) COLLATE utf8_hungarian_ci DEFAULT NULL, + `iskolaTelepules` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL, + `iskolaTelefon` varchar(32) COLLATE utf8_hungarian_ci DEFAULT NULL, + `iskolaEmail` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL, + KEY `ID_felveteli_iskolak_omkod` (`omkod`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +END IF; + +END $$ +DELIMITER ; +CALL upgrade_database_4775(); diff --git a/mayor-orig/mayor-naplo/update/pre004789-1-intezmeny.sql b/mayor-orig/mayor-naplo/update/pre004789-1-intezmeny.sql new file mode 100644 index 00000000..cfb21fda --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004789-1-intezmeny.sql @@ -0,0 +1,15 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4789 $$ + +CREATE PROCEDURE upgrade_database_4789() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +-- https://tasz.hu/cikkek/igy-vedd-meg-a-gyermeked-az-allamositastol + +ALTER TABLE `diakJogviszony` MODIFY `statusz` enum('felvételt nyert','jogviszonyban van','magántanuló','egyéni munkarend','vendégtanuló','jogviszonya felfüggesztve','jogviszonya lezárva') COLLATE utf8_hungarian_ci NOT NULL; +ALTER TABLE `diak` MODIFY `statusz` enum('felvételt nyert','jogviszonyban van','magántanuló','egyéni munkarend','vendégtanuló','jogviszonya felfüggesztve','jogviszonya lezárva') COLLATE utf8_hungarian_ci NOT NULL; + +END $$ +DELIMITER ; +CALL upgrade_database_4789(); diff --git a/mayor-orig/mayor-naplo/update/pre004789-2-intezmeny.sql b/mayor-orig/mayor-naplo/update/pre004789-2-intezmeny.sql new file mode 100644 index 00000000..4dd6c244 --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004789-2-intezmeny.sql @@ -0,0 +1,44 @@ +DELIMITER // + DROP FUNCTION IF EXISTS diakNaploSorszam // + CREATE function diakNaploSorszam ( thisDiakId INT, thisTanev INT, thisOsztalyId INT ) returns INT + READS SQL DATA + BEGIN + DECLARE inKezdesDt,inZarasDt DATE; + DECLARE a,i INT; -- for loop + DECLARE b DATE; -- for loop + DECLARE c DATE; + DECLARE d INT; + DECLARE e VARCHAR(255); + + DECLARE cur1 + CURSOR FOR + SELECT diakId,IF(beDt<inKezdesDt,inKezdesDt,beDt) AS tolDt,IF(ifnull(kiDt,inZarasDt)<inZarasDt,kiDt,inZarasDt) AS igDt, + (SELECT COUNT(*) FROM diakJogviszony AS ds + WHERE ds.diakId=diak.diakId AND tolDt<dt AND dt<=igDt AND ds.statusz IN ('jogviszonyban van','magántanuló','egyéni munkarend') + ) AS aktJogviszonyDb, + (SELECT statusz FROM diakJogviszony AS ds + WHERE ds.diakId=diak.diakId AND dt<=tolDt ORDER BY dt DESC LIMIT 1 + ) AS elozoStatusz + FROM osztalyDiak LEFT JOIN diak USING (diakId) + WHERE osztalyId=thisOsztalyId AND beDt<=inZarasDt AND (kiDt IS NULL OR kiDt>=inKezdesDt) + HAVING (aktJogviszonyDb>0 or elozoStatusz in ('magántanuló','jogviszonyban van','egyéni munkarend')) + ORDER BY tolDt, CONCAT_WS(' ',viseltCsaladinev,viseltUtonev) COLLATE utf8_hungarian_ci; + + DECLARE EXIT HANDLER FOR NOT FOUND RETURN NULL; + SELECT kezdesDt FROM szemeszter WHERE tanev=thisTanev AND szemeszter=1 INTO inKezdesDt; + SELECT MAX(zarasDt) FROM szemeszter WHERE tanev=thisTanev INTO inZarasDt; + + SET i := 1; + OPEN cur1; + lo: LOOP +-- FETCH cur1 INTO a,b; + FETCH cur1 INTO a,b,c,d,e; + IF a = thisDiakId THEN + LEAVE lo; + END IF; + SET i := i+1; + END LOOP; + CLOSE cur1; + return i; + END; // + DELIMITER ; // diff --git a/mayor-orig/mayor-naplo/update/pre004791-1-intezmeny.sql b/mayor-orig/mayor-naplo/update/pre004791-1-intezmeny.sql new file mode 100644 index 00000000..b3786834 --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004791-1-intezmeny.sql @@ -0,0 +1,23 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4791 $$ +CREATE PROCEDURE upgrade_database_4791() +BEGIN + +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +IF EXISTS ( + SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='kepzesOraterv' AND COLUMN_NAME='tipus' +) THEN + + alter table `kepzesOraterv` modify `tipus` + enum('első nyelv','második nyelv','mintatantervi','kötelezően választható 1.','kötelezően választható 2.', + 'szabadon választható 1.','szabadon választható 2.','művészetek','természettudomány') CHARACTER SET utf8 COLLATE utf8_hungarian_ci DEFAULT 'mintatantervi'; + +END IF; + +END $$ +DELIMITER ; +CALL upgrade_database_4791(); + +-- | Warning | 3719 | 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. | +-- | Warning | 3778 | 'utf8_hungarian_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead. diff --git a/mayor-orig/mayor-naplo/update/pre004800-1-intezmeny.sql b/mayor-orig/mayor-naplo/update/pre004800-1-intezmeny.sql new file mode 100644 index 00000000..9c9b6a20 --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004800-1-intezmeny.sql @@ -0,0 +1,17 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4800 $$ +CREATE PROCEDURE upgrade_database_4800() +BEGIN + +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +IF NOT EXISTS ( + SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='diak' AND COLUMN_NAME='emailMagan' +) THEN + + alter table `diak` ADD `emailMagan` varchar(255) AFTER `email`; +END IF; + +END $$ +DELIMITER ; +CALL upgrade_database_4800(); diff --git a/mayor-orig/mayor-naplo/update/pre004812-1-naplo.sql b/mayor-orig/mayor-naplo/update/pre004812-1-naplo.sql new file mode 100644 index 00000000..d5644095 --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004812-1-naplo.sql @@ -0,0 +1,13 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4812 $$ + +CREATE PROCEDURE upgrade_database_4812() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +ALTER TABLE `orarendiOra` MODIFY `targyJel` varchar(96) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL; +ALTER TABLE `orarendiOraTankor` MODIFY `targyJel` varchar(96) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL; + +END $$ +DELIMITER ; +CALL upgrade_database_4812(); diff --git a/mayor-orig/mayor-naplo/update/pre004819-1-naplo.sql b/mayor-orig/mayor-naplo/update/pre004819-1-naplo.sql new file mode 100644 index 00000000..c638832d --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004819-1-naplo.sql @@ -0,0 +1,12 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4819 $$ + +CREATE PROCEDURE upgrade_database_4819() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +ALTER TABLE `szeEgyediMinosites` MODIFY `egyediMinosites` text CHARACTER SET utf8 COLLATE utf8_hungarian_ci DEFAULT NULL; + +END $$ +DELIMITER ; +CALL upgrade_database_4819(); |