Bug 19889: DBRev 20.06.00.032
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 31 Aug 2020 14:05:05 +0000 (14:05 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 31 Aug 2020 14:17:58 +0000 (16:17 +0200)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha.pm
installer/data/mysql/atomicupdate/bug-19889.perl [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 10e7548..be10228 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 = "20.06.00.031";
+$VERSION = "20.06.00.032";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug-19889.perl b/installer/data/mysql/atomicupdate/bug-19889.perl
deleted file mode 100644 (file)
index 99c395a..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-$DBversion = 'XXX'; # will be replaced by the RM
-if( CheckVersion( $DBversion ) ) {
-    if( !column_exists( 'items', 'exclude_from_local_holds_priority' ) ) {
-        $dbh->do(q{
-            ALTER TABLE `items` ADD COLUMN `exclude_from_local_holds_priority` tinyint(1) default NULL AFTER `new_status` -- Exclude this item from local holds priority
-        });
-    }
-
-    if( !column_exists( 'deleteditems', 'exclude_from_local_holds_priority' ) ) {
-        $dbh->do(q{
-            ALTER TABLE `deleteditems` ADD COLUMN `exclude_from_local_holds_priority` tinyint(1) default NULL AFTER `new_status` -- Exclude this item from local holds priority
-        });
-    }
-
-    if( !column_exists( 'categories', 'exclude_from_local_holds_priority' ) ) {
-        $dbh->do(q{
-            ALTER TABLE `categories` ADD COLUMN `exclude_from_local_holds_priority` tinyint(1) default NULL AFTER `change_password` -- Exclude patrons of this category from local holds priority
-        });
-    }
-    # Always end with this (adjust the bug info)
-    NewVersion( $DBversion, 19889, "Add exclude_from_local_holds_priority column to items, deleteditems and categories tables");
-}
index ff05ba3..0a068f3 100755 (executable)
@@ -22703,6 +22703,28 @@ if( CheckVersion( $DBversion ) ) {
     NewVersion( $DBversion, 22789, "Add non_priority column on reserves and old_reserves tables");
 }
 
+$DBversion = '20.06.00.032';
+if( CheckVersion( $DBversion ) ) {
+    if( !column_exists( 'items', 'exclude_from_local_holds_priority' ) ) {
+        $dbh->do(q{
+            ALTER TABLE `items` ADD COLUMN `exclude_from_local_holds_priority` tinyint(1) default NULL AFTER `new_status`
+        });
+    }
+
+    if( !column_exists( 'deleteditems', 'exclude_from_local_holds_priority' ) ) {
+        $dbh->do(q{
+            ALTER TABLE `deleteditems` ADD COLUMN `exclude_from_local_holds_priority` tinyint(1) default NULL AFTER `new_status`
+        });
+    }
+
+    if( !column_exists( 'categories', 'exclude_from_local_holds_priority' ) ) {
+        $dbh->do(q{
+            ALTER TABLE `categories` ADD COLUMN `exclude_from_local_holds_priority` tinyint(1) default NULL AFTER `change_password`
+        });
+    }
+    NewVersion( $DBversion, 19889, "Add exclude_from_local_holds_priority column to items, deleteditems and categories tables");
+}
+
 # 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/';