From eee0020f4a1eaea3acf5fd53ea0a3d2e98b3ba35 Mon Sep 17 00:00:00 2001 From: Brendan A Gallagher Date: Thu, 23 Mar 2017 00:18:10 +0000 Subject: [PATCH] DBREV for Bug 18066 - Hea - Version 2 Signed-off-by: Brendan A Gallagher --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_18066.perl | 21 ------------------ installer/data/mysql/updatedatabase.pl | 22 +++++++++++++++++++ 3 files changed, 23 insertions(+), 22 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_18066.perl diff --git a/Koha.pm b/Koha.pm index 325ac53423..10f3958e19 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 = "16.12.00.014"; +$VERSION = "16.12.00.015"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_18066.perl b/installer/data/mysql/atomicupdate/bug_18066.perl deleted file mode 100644 index 4ad2fc817b..0000000000 --- a/installer/data/mysql/atomicupdate/bug_18066.perl +++ /dev/null @@ -1,21 +0,0 @@ -$DBversion = 'XXX'; -if( CheckVersion( $DBversion ) ) { - unless( column_exists( 'branches', 'geolocation' ) ) { - $dbh->do(q| - ALTER TABLE branches ADD COLUMN geolocation VARCHAR(255) DEFAULT NULL after opac_info - |); - } - - $dbh->do(q| - INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type ) VALUES ('UsageStatsGeolocation', '', NULL, 'Geolocation of the main library', 'Free'); - |); - $dbh->do(q| - INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type ) VALUES ('UsageStatsLibrariesInfo', '', NULL, 'Share libraries information', 'YesNo'); - |); - $dbh->do(q| - INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type ) VALUES ('UsageStatsPublicID', '', NULL, 'Public ID for Hea website', 'Free'); - |); - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 18066 - Hea version 2)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index a82fd23552..31e6cc87e5 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -13969,6 +13969,28 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 8010 - Search history can be added to the wrong patron)\n"; } +$DBversion = "16.12.00.015"; +if( CheckVersion( $DBversion ) ) { + unless( column_exists( 'branches', 'geolocation' ) ) { + $dbh->do(q| + ALTER TABLE branches ADD COLUMN geolocation VARCHAR(255) DEFAULT NULL after opac_info + |); + } + + $dbh->do(q| + INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type ) VALUES ('UsageStatsGeolocation', '', NULL, 'Geolocation of the main library', 'Free'); + |); + $dbh->do(q| + INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type ) VALUES ('UsageStatsLibrariesInfo', '', NULL, 'Share libraries information', 'YesNo'); + |); + $dbh->do(q| + INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type ) VALUES ('UsageStatsPublicID', '', NULL, 'Public ID for Hea website', 'Free'); + |) + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 18066 - Hea version 2)\n"; +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5