Bug 18427 - DBRev 16.12.00.026
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 21 Apr 2017 18:03:42 +0000 (14:03 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 21 Apr 2017 18:03:42 +0000 (14:03 -0400)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha.pm
installer/data/mysql/atomicupdate/bug18427.perl [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 65e1c10..efcd4fe 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 = "16.12.00.025";
+$VERSION = "16.12.00.026";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug18427.perl b/installer/data/mysql/atomicupdate/bug18427.perl
deleted file mode 100644 (file)
index a77a948..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-$DBversion = 'XXX';  # will be replaced by the RM
-if( CheckVersion( $DBversion ) ) {
-
-    # In order to be overcomplete, we check if the situation is what we expect
-    if( !index_exists( 'serialitems', 'PRIMARY' ) ) {
-        if( index_exists( 'serialitems', 'serialitemsidx' ) ) {
-            $dbh->do(q|
-ALTER TABLE serialitems ADD PRIMARY KEY (itemnumber), DROP INDEX serialitemsidx;
-            |);
-        } else {
-            $dbh->do(q|ALTER TABLE serialitems ADD PRIMARY KEY (itemnumber)|);
-        }
-    }
-
-    SetVersion( $DBversion );
-    print "Upgrade to $DBversion done (Bug 18427 - Add a primary key to serialitems)\n";
-}
index 6abc32b..a1ea65d 100755 (executable)
@@ -14134,6 +14134,24 @@ if( CheckVersion( $DBversion ) ) {
     print "Upgrade to $DBversion done (Bug 17669 - Introduce preference for deleting temporary uploads)\n";
 }
 
+$DBversion = '16.12.00.026';
+if( CheckVersion( $DBversion ) ) {
+
+    # In order to be overcomplete, we check if the situation is what we expect
+    if( !index_exists( 'serialitems', 'PRIMARY' ) ) {
+        if( index_exists( 'serialitems', 'serialitemsidx' ) ) {
+            $dbh->do(q|
+                ALTER TABLE serialitems ADD PRIMARY KEY (itemnumber), DROP INDEX serialitemsidx;
+            |);
+        } else {
+            $dbh->do(q|ALTER TABLE serialitems ADD PRIMARY KEY (itemnumber)|);
+        }
+    }
+
+    SetVersion( $DBversion );
+    print "Upgrade to $DBversion done (Bug 18427 - Add a primary key to serialitems)\n";
+}
+
 # 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.