Bug 20517: DBRev 21.12.00.023
authorFridolin Somers <fridolin.somers@biblibre.com>
Fri, 8 Apr 2022 13:06:03 +0000 (15:06 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 8 Apr 2022 13:49:17 +0000 (15:49 +0200)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha.pm
installer/data/mysql/atomicupdate/bug20517-sort-bin.perl [deleted file]
installer/data/mysql/db_revs/211200023.pl [new file with mode: 0755]

diff --git a/Koha.pm b/Koha.pm
index 147532d..be86637 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 = "21.12.00.022";
+$VERSION = "21.12.00.023";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug20517-sort-bin.perl b/installer/data/mysql/atomicupdate/bug20517-sort-bin.perl
deleted file mode 100644 (file)
index 1462118..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-$DBversion = 'XXX'; # will be replaced by the RM
-if( CheckVersion( $DBversion ) ) {
-    $dbh->do(q{
-        INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
-        ('SIP2SortBinMapping','',NULL,'Use the following mappings to determine the sort_bin of a returned item. The mapping should be on the form \"branchcode:item field:item field value:sort bin number\", with one mapping per line.','free'),;
-    });
-    NewVersion( $DBversion, 20517, "Add SIP2SortBinMapping system preference");
-}
diff --git a/installer/data/mysql/db_revs/211200023.pl b/installer/data/mysql/db_revs/211200023.pl
new file mode 100755 (executable)
index 0000000..172a881
--- /dev/null
@@ -0,0 +1,15 @@
+use Modern::Perl;
+
+return {
+    bug_number => "20517",
+    description => "Add SIP2SortBinMapping system preference",
+    up => sub {
+        my ($args) = @_;
+        my ($dbh, $out) = @$args{qw(dbh out)};
+        # Do you stuffs here
+        $dbh->do(q{
+            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
+            ('SIP2SortBinMapping','',NULL,'Use the following mappings to determine the sort_bin of a returned item. The mapping should be on the form \"branchcode:item field:item field value:sort bin number\", with one mapping per line.','free');
+       });
+    },
+};