Bug 33567: Add a dbrev for installation with empty pref
To keep current behavior, we can copy the removed fallback into the syspref value in case someone might have cleared the pref. Note: We are not restoring deleted prefs here; that is a data problem outside the scope of this report. A regular installation should always have this pref. Test plan: Run updatedatabase.pl Bonus: Clear the pref Reference_NFL_Statuses and run again, verify that the pref has changed. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
69bce3a706
commit
17704ae233
|
|
@ -0,0 +1,17 @@
|
|||
use Modern::Perl;
|
||||
|
||||
return {
|
||||
bug_number => 33567,
|
||||
description => "Replace empty Reference_NFL_Statuses pref",
|
||||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ($dbh, $out) = @$args{qw(dbh out)};
|
||||
|
||||
my $rv = $dbh->do(q{
|
||||
UPDATE systempreferences SET value='1|2'
|
||||
WHERE variable = 'Reference_NFL_Statuses' AND COALESCE(value,'')=''
|
||||
});
|
||||
say $out "Updated preference Reference_NFL_Statuses to default"
|
||||
if $rv && $rv == 1;
|
||||
},
|
||||
};
|
||||
Loading…
Reference in New Issue