From 092276f53c0b82c1311afe9425d13d83a528ca12 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 31 Aug 2020 14:05:05 +0000 Subject: [PATCH] Bug 19889: DBRev 20.06.00.032 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug-19889.perl | 22 ------------------- installer/data/mysql/updatedatabase.pl | 22 +++++++++++++++++++ 3 files changed, 23 insertions(+), 23 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug-19889.perl diff --git a/Koha.pm b/Koha.pm index 10e7548ef2..be102282dd 100644 --- 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 index 99c395af7d..0000000000 --- a/installer/data/mysql/atomicupdate/bug-19889.perl +++ /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"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index ff05ba3085..0a068f3f46 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -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/'; -- 2.39.5