Bug 19670: DBRev 18.05.11.002
authorLucas Gass <lucas@bywatersolutions.com>
Tue, 23 Apr 2019 13:51:49 +0000 (13:51 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Tue, 23 Apr 2019 13:51:49 +0000 (13:51 +0000)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Koha.pm
installer/data/mysql/atomicupdate/bug_19670.perl [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 14cc8d2..d41f636 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 = "18.05.11.001";
+$VERSION = "18.05.11.002";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_19670.perl b/installer/data/mysql/atomicupdate/bug_19670.perl
deleted file mode 100644 (file)
index fbe9e91..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-$DBversion = 'XXX'; # will be replaced by the RM
-if( CheckVersion( $DBversion ) ) {
-    my $table_sth = $dbh->prepare('SHOW CREATE TABLE `search_marc_map`');
-    $table_sth->execute();
-    my @table = $table_sth->fetchrow_array();
-    unless ( $table[1] =~ /`marc_field`.*COLLATE utf8mb4_bin/ ) { #catches utf8mb4 collated tables
-        $dbh->do("ALTER TABLE `search_marc_map` MODIFY `marc_field` VARCHAR(255) NOT NULL COLLATE utf8mb4_bin COMMENT 'the MARC specifier for this field'");
-    }
-
-    # Always end with this (adjust the bug info)
-    SetVersion( $DBversion );
-       print "Upgrade to $DBversion done (Bug 19670 - Change collation of marc_field to allow mixed case search field mappings)\n";
-}
index 914392a..bd8b868 100755 (executable)
@@ -16351,11 +16351,23 @@ if( CheckVersion( $DBversion ) ) {
     $dbh->do( "ALTER TABLE issues MODIFY COLUMN renewals tinyint(4) NOT NULL default 0");
     $dbh->do( "ALTER TABLE old_issues MODIFY COLUMN renewals tinyint(4) NOT NULL default 0");
 
-    # Always end with this (adjust the bug info)
     SetVersion( $DBversion );
     print "Upgrade to $DBversion done (Bug 22607 - Set default value of issues.renewals to 0)\n";
 }
 
+$DBversion = '18.05.11.002'; 
+if( CheckVersion( $DBversion ) ) {
+    my $table_sth = $dbh->prepare('SHOW CREATE TABLE `search_marc_map`');
+    $table_sth->execute();
+    my @table = $table_sth->fetchrow_array();
+    unless ( $table[1] =~ /`marc_field`.*COLLATE utf8mb4_bin/ ) { #catches utf8mb4 collated tables
+        $dbh->do("ALTER TABLE `search_marc_map` MODIFY `marc_field` VARCHAR(255) NOT NULL COLLATE utf8mb4_bin COMMENT 'the MARC specifier for this field'");
+    }
+
+    SetVersion( $DBversion );
+    print "Upgrade to $DBversion done (Bug 19670 - Change collation of marc_field to allow mixed case search field mappings)\n";
+}
+
 # SEE bug 13068
 # if there is anything in the atomicupdate, read and execute it.