Bug 26302: DBRev 21.06.00.019
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 30 Aug 2021 15:08:58 +0000 (17:08 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 30 Aug 2021 15:09:31 +0000 (17:09 +0200)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha.pm
installer/data/mysql/atomicupdate/bug_26302.perl [deleted file]
installer/data/mysql/db_revs/210600019.pl [new file with mode: 0755]

diff --git a/Koha.pm b/Koha.pm
index fdeb021..8b7fcc8 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.06.00.018";
+$VERSION = "21.06.00.019";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_26302.perl b/installer/data/mysql/atomicupdate/bug_26302.perl
deleted file mode 100644 (file)
index 0fc7689..0000000
+++ /dev/null
@@ -1,9 +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
-            ('OPACResultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'),
-            ('OPACResultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer')
-    |);
-    NewVersion( $DBversion, 26302, "Add preferences OPACResultsMaxItems and OPACResultsMaxItemsUnavailable");
-}
diff --git a/installer/data/mysql/db_revs/210600019.pl b/installer/data/mysql/db_revs/210600019.pl
new file mode 100755 (executable)
index 0000000..d42f5e8
--- /dev/null
@@ -0,0 +1,15 @@
+use Modern::Perl;
+
+return {
+    bug_number => "26302",
+    description => "Add system preferences OPACResultsMaxItems and OPACResultsMaxItemsUnavailable");
+    up => sub {
+        my ($args) = @_;
+        my ($dbh, $out) = @$args{qw(dbh out)};
+        $dbh->do(q|
+            INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES
+                ('OPACResultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'),
+                ('OPACResultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer')
+        |);
+    },
+}