aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/update
diff options
context:
space:
mode:
authorM.Gergo2021-05-17 17:50:05 +0200
committerM.Gergo2021-05-17 17:50:05 +0200
commitef8b3fd973fa34b303370d5acc21744e57bca507 (patch)
tree67a42f55b0f36f024c33d8892c1112e8c5746556 /mayor-orig/mayor-naplo/update
parentfb24a50c54d5776468e49def08aea44c4077eb47 (diff)
downloadmayor-ef8b3fd973fa34b303370d5acc21744e57bca507.tar.gz
mayor-ef8b3fd973fa34b303370d5acc21744e57bca507.zip
Rev: 4787rev4787
Diffstat (limited to 'mayor-orig/mayor-naplo/update')
-rw-r--r--mayor-orig/mayor-naplo/update/pre004721-1-intezmeny.sql13
-rw-r--r--mayor-orig/mayor-naplo/update/pre004722-1-naplo.sql98
-rw-r--r--mayor-orig/mayor-naplo/update/pre004722-2-intezmeny.sql12
-rw-r--r--mayor-orig/mayor-naplo/update/pre004725-1-naplo.sql16
-rw-r--r--mayor-orig/mayor-naplo/update/pre004734-1-naplo.sql16
-rw-r--r--mayor-orig/mayor-naplo/update/pre004735-1-intezmeny.sql24
-rw-r--r--mayor-orig/mayor-naplo/update/pre004736-1-intezmeny.sql18
-rw-r--r--mayor-orig/mayor-naplo/update/pre004737-1-naplo.sql18
-rw-r--r--mayor-orig/mayor-naplo/update/pre004742-1-intezmeny.sql12
-rw-r--r--mayor-orig/mayor-naplo/update/pre004772-1-naplo.sql29
-rw-r--r--mayor-orig/mayor-naplo/update/pre004772-2.sh13
-rw-r--r--mayor-orig/mayor-naplo/update/pre004775-1-naplo.sql27
12 files changed, 296 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();