From 246bfdefe37a751c39d37cbb335896efeac54e7c 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 Content-Type: text/plain; charset=utf-8 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 --- installer/data/mysql/updatedatabase.pl | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index de77bf3..e4d6d70 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8613,6 +8613,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) -- 1.7.7.6