Bug 24474: DBRev 19.12.00.061
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 3 Apr 2020 13:04:48 +0000 (14:04 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 3 Apr 2020 13:26:32 +0000 (14:26 +0100)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

diff --git a/Koha.pm b/Koha.pm
index bc6030b..cdd737d 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.060";
+$VERSION = "19.12.00.061";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_24474.perl b/installer/data/mysql/atomicupdate/bug_24474.perl
deleted file mode 100644 (file)
index c964d0c..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-$DBversion = 'XXX'; # will be replaced by the RM
-if ( CheckVersion($DBversion) ) {
-    $dbh->do(q{
-        UPDATE
-          systempreferences
-        SET
-          options = "batchmod|moredetail|cronjob|additem|pendingreserves|onpayment"
-        WHERE
-          variable = "MarkLostItemsAsReturned"
-    });
-
-    my $lost_item_returned = C4::Context->preference("MarkLostItemsAsReturned");
-    my @set = split( ",", $lost_item_returned );
-    push @set, 'onpayment';
-    $lost_item_returned = join( ",", @set );
-
-    $dbh->do(qq{
-        UPDATE
-          systempreferences
-        SET
-          value = "$lost_item_returned"
-        WHERE
-          variable = "MarkLostItemsAsReturned"
-    });
-
-    SetVersion($DBversion);
-    print "Upgrade to $DBversion done (Bug 24474 - Add `onpayment` option to MarkLostItemsAsReturned)\n";
-}
index bbf268f..cfa0318 100755 (executable)
@@ -21397,6 +21397,34 @@ if( CheckVersion( $DBversion ) ) {
     NewVersion( $DBversion, 23204, "Change enum order for marc_type in search_marc_map to fix sorting");
 }
 
+$DBversion = '19.12.00.061';
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(q{
+        UPDATE
+          systempreferences
+        SET
+          options = "batchmod|moredetail|cronjob|additem|pendingreserves|onpayment"
+        WHERE
+          variable = "MarkLostItemsAsReturned"
+    });
+
+    my $lost_item_returned = C4::Context->preference("MarkLostItemsAsReturned");
+    my @set = split( ",", $lost_item_returned );
+    push @set, 'onpayment';
+    $lost_item_returned = join( ",", @set );
+
+    $dbh->do(qq{
+        UPDATE
+          systempreferences
+        SET
+          value = "$lost_item_returned"
+        WHERE
+          variable = "MarkLostItemsAsReturned"
+    });
+
+    NewVersion( $DBversion, 24474, "Add `onpayment` option to MarkLostItemsAsReturned");
+}
+
 # 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/';