From bedac4babaf45274549af8c03798d1e2285c5f9b Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 23 Sep 2020 09:45:49 -0300 Subject: [PATCH] Bug 26513: Fix problematic DBRev order Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/updatedatabase.pl | 44 +++++++++++++------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 40e6a11a3f6..ee0bc9910e4 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -22703,28 +22703,6 @@ 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 `require_strong_password` - }); - } - NewVersion( $DBversion, 19889, "Add exclude_from_local_holds_priority column to items, deleteditems and categories tables"); -} - $DBversion = '20.06.00.033'; if( CheckVersion( $DBversion ) ) { if( column_exists( 'opac_news', 'timestamp' ) ) { @@ -22807,6 +22785,28 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 18958, "Add reserve_id to hold_fill_targets"); } +$DBversion = '20.06.00.040'; +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 `require_strong_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.28.0