Bug 16070: Default value for sysprefs should be an empty string
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 15 Mar 2016 10:05:06 +0000 (10:05 +0000)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Thu, 31 Mar 2016 19:42:32 +0000 (19:42 +0000)
commitaba733cf7fcd6057f6ccf3a9ba1ea39060722774
treec050d92ebde56aa21cf1419ba7847abb4a33c33a
parentd995613eaf22647aea860b411d1d0b10ddaf9149
 Bug 16070: Default value for sysprefs should be an empty string

The default value for sysprefs should not be NULL but an empty string.
When a pref is cleared, it's set to an empty string, so it does not make
sense to create it with an undefined value.

The main purpose of this patch is to remove the warning in logs when a
pref is accessed for the first time and the cache is not yet populated.
It also ensures that the behavior will be the same for the first access
and the others.

Test plan:
SELECT COUNT(*) FROM systempreferences WHERE value IS NULL;
Should not return any results after the update DB entry executed.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
installer/data/mysql/sysprefs.sql