Bug 24759: DBRev 19.12.00.051
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 24 Mar 2020 10:54:00 +0000 (10:54 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 24 Mar 2020 10:54:45 +0000 (10:54 +0000)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

diff --git a/Koha.pm b/Koha.pm
index 76ad97e..a30bb4f 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 = "19.12.00.050";
+$VERSION = "19.12.00.051";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/Bug_24759_cleanup_OpacRenewalBranch.perl b/installer/data/mysql/atomicupdate/Bug_24759_cleanup_OpacRenewalBranch.perl
deleted file mode 100644 (file)
index f447939..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-$DBversion = 'XXX';
-if( CheckVersion( $DBversion ) ) {
-    $dbh->do(q{
-        UPDATE systempreferences SET options = 'itemhomebranch|patronhomebranch|checkoutbranch|none' WHERE variable='OpacRenewalBranch'
-    });
-    $dbh->do(q{
-        UPDATE systempreferences SET value = "none" WHERE variable='OpacRenewalBranch'
-        AND value = 'NULL'
-    });
-    $dbh->do(q{
-        UPDATE systempreferences SET value = 'opacrenew' WHERE variable='OpacRenewalBranch'
-        AND value NOT IN ('checkoutbranch','itemhomebranch','opacrenew','patronhomebranch','none')
-    });
-    SetVersion( $DBversion );
-    print "Upgrade to $DBversion done (Bug 24759 - cleanup OpacRenewalBranch)\n";
-}
index ddd339d..fa3f937 100755 (executable)
@@ -21211,6 +21211,23 @@ if( CheckVersion( $DBversion ) ) {
     NewVersion( $DBversion, 24854, "Remove IDreamBooks* system preferences");
 }
 
+$DBversion = '19.12.00.051';
+if( CheckVersion( $DBversion ) ) {
+    $dbh->do(q{
+        UPDATE systempreferences SET options = 'itemhomebranch|patronhomebranch|checkoutbranch|none' WHERE variable='OpacRenewalBranch'
+    });
+    $dbh->do(q{
+        UPDATE systempreferences SET value = "none" WHERE variable='OpacRenewalBranch'
+        AND value = 'NULL'
+    });
+    $dbh->do(q{
+        UPDATE systempreferences SET value = 'opacrenew' WHERE variable='OpacRenewalBranch'
+        AND value NOT IN ('checkoutbranch','itemhomebranch','opacrenew','patronhomebranch','none')
+    });
+
+    NewVersion( $DBversion, 24759, "Cleanup OpacRenewalBranch");
+}
+
 # SEE bug 13068
 # if there is anything in the atomicupdate, read and execute it.
 my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';