Bug 14100: DBRev 3.21.00.044
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 27 Oct 2015 15:45:36 +0000 (12:45 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 27 Oct 2015 15:45:36 +0000 (12:45 -0300)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha.pm
installer/data/mysql/atomicupdate/Bug_14100-add_table_localization.sql [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index eadc94b..482e80a 100644 (file)
--- a/Koha.pm
+++ b/Koha.pm
@@ -29,7 +29,7 @@ use vars qw{ $VERSION };
 # - #4 : the developer version. The 4th number is the database subversion.
 #        used by developers when the database changes. updatedatabase take care of the changes itself
 #        and is automatically called by Auth.pm when needed.
-$VERSION = "3.21.00.043";
+$VERSION = "3.21.00.044";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/Bug_14100-add_table_localization.sql b/installer/data/mysql/atomicupdate/Bug_14100-add_table_localization.sql
deleted file mode 100644 (file)
index ebe4b7e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-CREATE TABLE `localization` (
-      localization_id int(11) NOT NULL AUTO_INCREMENT,
-      entity varchar(16) COLLATE utf8_unicode_ci NOT NULL,
-      code varchar(64) COLLATE utf8_unicode_ci NOT NULL,
-      lang varchar(25) COLLATE utf8_unicode_ci NOT NULL,
-      translation text COLLATE utf8_unicode_ci,
-      PRIMARY KEY (localization_id),
-      UNIQUE KEY `entity_code_lang` (`entity`,`code`,`lang`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
index 351feb7..9ea9050 100755 (executable)
@@ -11192,6 +11192,23 @@ if ( CheckVersion($DBversion) ) {
     SetVersion($DBversion);
 }
 
+$DBversion = "3.21.00.044";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(q|
+        CREATE TABLE localization (
+            localization_id int(11) NOT NULL AUTO_INCREMENT,
+            entity varchar(16) COLLATE utf8_unicode_ci NOT NULL,
+            code varchar(64) COLLATE utf8_unicode_ci NOT NULL,
+            lang varchar(25) COLLATE utf8_unicode_ci NOT NULL,
+            translation text COLLATE utf8_unicode_ci,
+            PRIMARY KEY (localization_id),
+            UNIQUE KEY entity_code_lang (entity,code,lang)
+        ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
+    |);
+    print "Upgrade to $DBversion done (Bug 14100: Generic solution for language overlay)\n";
+    SetVersion($DBversion);
+}
+
 # DEVELOPER PROCESS, search for anything to execute in the db_update directory
 # SEE bug 13068
 # if there is anything in the atomicupdate, read and execute it.