From a6da517127aeb4c89c204e3a672831e0069ed4ba Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 21 Aug 2014 13:06:20 +0200 Subject: [PATCH] Bug 12728: [QA Follow-up] Add StatisticsFields to sysprefs.sql This patch adds a dbrev. If people installed Koha after the initial dbrev (3.09.00.015), an install with sysprefs.sql did not add the pref. So they still could not have it. Test plan: If you have the pref, running an database update should not do anything. If you do not have the pref (delete it via mysql), it should be added. Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/updatedatabase.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index f16ecdc74b..f6266d4215 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8766,6 +8766,16 @@ if(CheckVersion($DBversion)) { SetVersion($DBversion); } + +$DBversion = '3.17.00.XXX'; +if ( CheckVersion($DBversion) ) { + $dbh->do(qq{ + INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('StatisticsFields','location|itype|ccode','Define fields (from the items table) used for statistics members',NULL,'Free') + }); + print "Upgrade to $DBversion done (Bug 12728: Checked syspref StatisticsFields)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) -- 2.39.5