From 9d701fe12d6011ef6a6d1792fb608b3654f168b3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 8 Nov 2017 13:31:06 -0300 Subject: [PATCH] Bug 18882: DBRev 17.06.000.027 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_18882.perl | 9 -------- installer/data/mysql/updatedatabase.pl | 22 ++++++++++++++----- 3 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_18882.perl diff --git a/Koha.pm b/Koha.pm index 54994e676a..4669c9502a 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 = "17.06.00.026"; +$VERSION = "17.06.00.027"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_18882.perl b/installer/data/mysql/atomicupdate/bug_18882.perl deleted file mode 100644 index 154ef0d7b8..0000000000 --- a/installer/data/mysql/atomicupdate/bug_18882.perl +++ /dev/null @@ -1,9 +0,0 @@ -$DBversion = 'XXX'; -if ( CheckVersion($DBversion) ) { - if ( !column_exists( 'statistics', 'location' ) ) { - $dbh->do('ALTER TABLE statistics ADD COLUMN location VARCHAR(80) default NULL AFTER itemtype'); - } - - SetVersion($DBversion); - print "Upgrade to $DBversion done (Bug 18882 - Add location code to statistics table for checkouts and renewals)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index ed3ae03535..dbe30fa199 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -14948,15 +14948,25 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 13178 - Increase cardnumber fields to VARCHAR(32))\n"; } -$DBversion = '17.06.00.026'; -if( CheckVersion( $DBversion ) ) { +$dbversion = '17.06.00.026'; +if( checkversion( $dbversion ) ) { $dbh->do(q{ - INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES - ('BlockReturnOfLostItems','0','0','If enabled, items that are marked as lost cannot be returned.','YesNo'); + insert ignore into systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) values + ('blockreturnoflostitems','0','0','if enabled, items that are marked as lost cannot be returned.','yesno'); }); - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 10748 - Add system preference BlockReturnOfLostItems)\n"; + setversion( $dbversion ); + print "upgrade to $dbversion done (bug 10748 - add system preference blockreturnoflostitems)\n"; +} + +$dbversion = '17.06.00.027'; +if( checkversion( $dbversion ) ) { + if ( !column_exists( 'statistics', 'location' ) ) { + $dbh->do('ALTER TABLE statistics ADD COLUMN location VARCHAR(80) default NULL AFTER itemtype'); + } + + SetVersion($DBversion); + print "Upgrade to $DBversion done (Bug 18882 - Add location code to statistics table for checkouts and renewals)\n"; } # DEVELOPER PROCESS, search for anything to execute in the db_update directory -- 2.39.5