aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/update
diff options
context:
space:
mode:
Diffstat (limited to 'mayor-orig/mayor-naplo/update')
-rw-r--r--mayor-orig/mayor-naplo/update/pre004531-1-intezmeny.sql19
-rw-r--r--mayor-orig/mayor-naplo/update/pre004531-2-naplo.sql20
-rw-r--r--mayor-orig/mayor-naplo/update/pre004532-1-intezmeny.sql1
-rw-r--r--mayor-orig/mayor-naplo/update/pre004532-2-naplo.sql1
4 files changed, 41 insertions, 0 deletions
diff --git a/mayor-orig/mayor-naplo/update/pre004531-1-intezmeny.sql b/mayor-orig/mayor-naplo/update/pre004531-1-intezmeny.sql
new file mode 100644
index 00000000..c616f6d4
--- /dev/null
+++ b/mayor-orig/mayor-naplo/update/pre004531-1-intezmeny.sql
@@ -0,0 +1,19 @@
+DELIMITER $$
+DROP PROCEDURE IF EXISTS upgrade_database_4531 $$
+
+CREATE PROCEDURE upgrade_database_4531()
+BEGIN
+SET NAMES utf8 COLLATE utf8_hungarian_ci;
+
+IF NOT EXISTS (SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='cimke') THEN
+ CREATE TABLE `cimke` (
+ `cimkeId` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `cimkeLeiras` varchar(16) NOT NULL,
+ PRIMARY KEY (`cimkeId`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci;
+END IF;
+
+
+END $$
+DELIMITER ;
+CALL upgrade_database_4531();
diff --git a/mayor-orig/mayor-naplo/update/pre004531-2-naplo.sql b/mayor-orig/mayor-naplo/update/pre004531-2-naplo.sql
new file mode 100644
index 00000000..54d52778
--- /dev/null
+++ b/mayor-orig/mayor-naplo/update/pre004531-2-naplo.sql
@@ -0,0 +1,20 @@
+DELIMITER $$
+DROP PROCEDURE IF EXISTS upgrade_database_4531_2 $$
+
+CREATE PROCEDURE upgrade_database_4531_2()
+BEGIN
+SET NAMES utf8 COLLATE utf8_hungarian_ci;
+
+IF NOT EXISTS (SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='oraCimke') THEN
+ CREATE TABLE `oraCimke` (
+ `oraId` int(10) unsigned NOT NULL,
+ `cimkeId` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`oraId`,`cimkeId`),
+ CONSTRAINT `oraCimke_ibfk_1` FOREIGN KEY (`oraId`) REFERENCES `ora` (`oraId`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `oraCimke_ibfk_2` FOREIGN KEY (`cimkeId`) REFERENCES %INTEZMENYDB%.`cimke` (`cimkeId`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci;
+END IF;
+
+END $$
+DELIMITER ;
+CALL upgrade_database_4531_2();
diff --git a/mayor-orig/mayor-naplo/update/pre004532-1-intezmeny.sql b/mayor-orig/mayor-naplo/update/pre004532-1-intezmeny.sql
new file mode 100644
index 00000000..d8a4ec87
--- /dev/null
+++ b/mayor-orig/mayor-naplo/update/pre004532-1-intezmeny.sql
@@ -0,0 +1 @@
+CALL upgrade_database_4531();
diff --git a/mayor-orig/mayor-naplo/update/pre004532-2-naplo.sql b/mayor-orig/mayor-naplo/update/pre004532-2-naplo.sql
new file mode 100644
index 00000000..d19581ef
--- /dev/null
+++ b/mayor-orig/mayor-naplo/update/pre004532-2-naplo.sql
@@ -0,0 +1 @@
+CALL upgrade_database_4531_2();