Bug 6536: DBRev 3.17.00.017
authorTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 1 Sep 2014 13:11:34 +0000 (10:11 -0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 1 Sep 2014 13:11:34 +0000 (10:11 -0300)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
installer/data/mysql/updatedatabase.pl
kohaversion.pl

index fac981a..094576b 100755 (executable)
@@ -8577,35 +8577,6 @@ if ( CheckVersion($DBversion) ) {
     SetVersion($DBversion);
 }
 
-
-$DBversion = "3.17.00.XXX";
-if ( CheckVersion($DBversion) ) {
-    # Correct invalid recordtypes (should be very exceptional)
-    $dbh->do(q{
-        UPDATE z3950servers set recordtype='biblio' WHERE recordtype NOT IN ('authority','biblio')
-    });
-    # Correct invalid server types (should also be very exceptional)
-    $dbh->do(q{
-        UPDATE z3950servers set type='zed' WHERE type <> 'zed'
-    });
-    # Adjust table
-    $dbh->do(q{
-        ALTER TABLE z3950servers
-        DROP COLUMN icon,
-        DROP COLUMN description,
-        DROP COLUMN position,
-        MODIFY COLUMN id int NOT NULL AUTO_INCREMENT FIRST,
-        MODIFY COLUMN recordtype enum('authority','biblio') NOT NULL DEFAULT 'biblio',
-        CHANGE COLUMN name servername mediumtext NOT NULL,
-        CHANGE COLUMN type servertype enum('zed','sru') NOT NULL DEFAULT 'zed',
-        ADD COLUMN sru_options varchar(255) default NULL,
-        ADD COLUMN sru_fields mediumtext default NULL,
-        ADD COLUMN add_xslt mediumtext default NULL
-    });
-    print "Upgrade to $DBversion done (Bug 6536: Z3950 improvements)\n";
-    SetVersion ($DBversion);
-}
-
 $DBversion = "3.17.00.011";
 if ( CheckVersion($DBversion) ) {
     $dbh->do("INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'hr', 'language', 'Croatian','2014-07-24' )");
@@ -8698,6 +8669,33 @@ if ( CheckVersion($DBversion) ) {
     SetVersion($DBversion);
 }
 
+$DBversion = "3.17.00.017";
+if ( CheckVersion($DBversion) ) {
+    # Correct invalid recordtypes (should be very exceptional)
+    $dbh->do(q{
+        UPDATE z3950servers set recordtype='biblio' WHERE recordtype NOT IN ('authority','biblio')
+    });
+    # Correct invalid server types (should also be very exceptional)
+    $dbh->do(q{
+        UPDATE z3950servers set type='zed' WHERE type <> 'zed'
+    });
+    # Adjust table
+    $dbh->do(q{
+        ALTER TABLE z3950servers
+        DROP COLUMN icon,
+        DROP COLUMN description,
+        DROP COLUMN position,
+        MODIFY COLUMN id int NOT NULL AUTO_INCREMENT FIRST,
+        MODIFY COLUMN recordtype enum('authority','biblio') NOT NULL DEFAULT 'biblio',
+        CHANGE COLUMN name servername mediumtext NOT NULL,
+        CHANGE COLUMN type servertype enum('zed','sru') NOT NULL DEFAULT 'zed',
+        ADD COLUMN sru_options varchar(255) default NULL,
+        ADD COLUMN sru_fields mediumtext default NULL,
+        ADD COLUMN add_xslt mediumtext default NULL
+    });
+    print "Upgrade to $DBversion done (Bug 6536: Z3950 improvements)\n";
+    SetVersion ($DBversion);
+}
 
 =head1 FUNCTIONS
 
index 7e22632..1f69dcb 100644 (file)
@@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts :
 use strict;
 
 sub kohaversion {
-    our $VERSION = '3.17.00.016';
+    our $VERSION = '3.17.00.017';
     # version needs to be set this way
     # so that it can be picked up by Makefile.PL
     # during install