From 8b17e1ae2ccde6f03037a311f5c398c46c21022f Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 10 Mar 2020 15:09:07 +0000 Subject: [PATCH] Bug 17845: DBRev 19.12.00.039 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_17845.perl | 13 ------------- installer/data/mysql/updatedatabase.pl | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 14 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_17845.perl diff --git a/Koha.pm b/Koha.pm index e696364fe2..18d8543d89 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 = "19.12.00.038"; +$VERSION = "19.12.00.039"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_17845.perl b/installer/data/mysql/atomicupdate/bug_17845.perl deleted file mode 100644 index a9dc391f60..0000000000 --- a/installer/data/mysql/atomicupdate/bug_17845.perl +++ /dev/null @@ -1,13 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - $dbh->do( "DROP TABLE IF EXISTS printers" ); - - if( column_exists( 'branches', 'branchprinter' ) ) { - $dbh->do( "ALTER TABLE branches DROP COLUMN branchprinter" ); - } - - $dbh->do(qq{ DELETE FROM systempreferences WHERE variable = "printcirculationslips"} ); - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 17845 - Drop unused table printers and branchprinter column)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index cc5e8275e6..e5534c4f89 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -21078,6 +21078,20 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 23112 - Add CirculateILL syspref)\n"; } +$DBversion = '19.12.00.039'; +if( CheckVersion( $DBversion ) ) { + $dbh->do( "DROP TABLE IF EXISTS printers" ); + + if( column_exists( 'branches', 'branchprinter' ) ) { + $dbh->do( "ALTER TABLE branches DROP COLUMN branchprinter" ); + } + + $dbh->do(qq{ DELETE FROM systempreferences WHERE variable = "printcirculationslips"} ); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 17845 - Drop unused table printers and branchprinter column)\n"; +} + # 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