From 0fcfc561adae216d630a7b770440e7d5c315dcd2 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 31 Mar 2017 11:19:50 +0000 Subject: [PATCH] Bug 15498 - DBRev 16.12.00.018 Signed-off-by: Kyle M Hall --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_15475.sql | 6 ------ installer/data/mysql/updatedatabase.pl | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+), 7 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_15475.sql diff --git a/Koha.pm b/Koha.pm index cf268ab0d1..361d1f001d 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.017"; +$VERSION = "16.12.00.018"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_15475.sql b/installer/data/mysql/atomicupdate/bug_15475.sql deleted file mode 100644 index 9c34eefa5e..0000000000 --- a/installer/data/mysql/atomicupdate/bug_15475.sql +++ /dev/null @@ -1,6 +0,0 @@ -INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) - SELECT 'ExportCircHistory', COUNT(*), NULL, "Display the export circulation options", 'YesNo' - FROM systempreferences - WHERE ( variable = 'ExportRemoveFields' AND value != "" AND value IS NOT NULL ) - OR ( variable = 'ExportWithCsvProfile' AND value != "" AND value IS NOT NULL ); -DELETE FROM systempreferences WHERE variable="ExportWithCsvProfile"; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 63974ca996..9f283a1016 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -14016,6 +14016,24 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "16.12.00.018"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) + SELECT 'ExportCircHistory', COUNT(*), NULL, "Display the export circulation options", 'YesNo' + FROM systempreferences + WHERE ( variable = 'ExportRemoveFields' AND value != "" AND value IS NOT NULL ) + OR ( variable = 'ExportWithCsvProfile' AND value != "" AND value IS NOT NULL ); + }); + + $dbh->do(q{ + DELETE FROM systempreferences WHERE variable="ExportWithCsvProfile"; + }); + + print "Upgrade to $DBversion done (Bug 15498 - Replace ExportWithCsvProfile with ExportCircHistory)'\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.39.5