From 7cb3a607d8a194268758889198db1b610b2beb85 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Sun, 25 Sep 2016 14:02:13 +0000 Subject: [PATCH] Bug 14707 - DBRev 16.06.00.029 Signed-off-by: Kyle M Hall --- Koha.pm | 2 +- installer/data/mysql/updatedatabase.pl | 50 ++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/Koha.pm b/Koha.pm index 072f7fb7da..0134a98f46 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.06.00.028"; +$VERSION = "16.06.00.029"; sub version { return $VERSION; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 141d16418f..36e3a74f2b 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -13014,6 +13014,56 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { } } +$DBversion = "16.06.00.029"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + UPDATE systempreferences SET type="Choice" WHERE variable="UsageStatsLibraryType"; + }); + $dbh->do(q{ + UPDATE systempreferences SET value="Canada" WHERE variable="UsageStatsCountry" AND value="CANADA"; + }); + $dbh->do(q{ + UPDATE systempreferences SET value="Czech Republic" WHERE variable="UsageStatsCountry" AND value="CZ"; + }); + $dbh->do(q{ + UPDATE systempreferences SET value="United Kingdom" WHERE variable="UsageStatsCountry" AND (value="England" OR value="UK"); + }); + $dbh->do(q{ + UPDATE systempreferences SET value="Spain" WHERE variable="UsageStatsCountry" AND value="España"; + }); + $dbh->do(q{ + UPDATE systempreferences SET value="Greece" WHERE variable="UsageStatsCountry" AND value="GR"; + }); + $dbh->do(q{ + UPDATE systempreferences SET value="Ireland" WHERE variable="UsageStatsCountry" AND value="Irelanbd"; + }); + $dbh->do(q{ + UPDATE systempreferences SET value="Mexico" WHERE variable="UsageStatsCountry" AND value="México"; + }); + $dbh->do(q{ + UPDATE systempreferences SET value="Peru" WHERE variable="UsageStatsCountry" AND value="Perú"; + }); + $dbh->do(q{ + UPDATE systempreferences SET value="Dominican Rep." WHERE variable="UsageStatsCountry" AND value="República Dominicana"; + }); + $dbh->do(q{ + UPDATE systempreferences SET value="Trinidad & Tob." WHERE variable="UsageStatsCountry" AND value="Trinidad"; + }); + $dbh->do(q{ + UPDATE systempreferences SET value="Turkey" WHERE variable="UsageStatsCountry" AND value="Türkiye"; + }); + $dbh->do(q{ + UPDATE systempreferences SET value="USA" WHERE variable="UsageStatsCountry" AND (value="United States" OR value="United States of America" OR value="US"); + }); + $dbh->do(q{ + UPDATE systempreferences SET value="Zimbabwe" WHERE variable="UsageStatsCountry" AND value="Zimbabbwe"; + }); + + print "Upgrade to $DBversion done (Bug 14707 - Change UsageStatsCountry from free text to a dropdown list)\n"; + SetVersion($DBversion); +} + + # 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.20.1