Bug 39526: Prevent other prefs to be renamed
There is only one pref. It feel safer to rename this specific pref than other pref that might not be ES related. Other prefs starting with "ES" could be added, then this patch backported, etc. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
c4a6c7584d
commit
8dbf22f996
|
|
@ -8,11 +8,9 @@ return {
|
|||
my ($args) = @_;
|
||||
my ( $dbh, $out ) = @$args{qw(dbh out)};
|
||||
|
||||
# Do you stuffs here
|
||||
$dbh->do(
|
||||
q{update systempreferences set variable = REGEXP_REPLACE(variable, '^ES', 'Elasticsearch') where variable like 'ES%'}
|
||||
);
|
||||
|
||||
say $out "Renamed system preference 'ES..' to 'Elasticsearch..'";
|
||||
q{UPDATE systempreferences SET variable = 'ElasticsearchPreventAutoTruncate' WHERE variable = 'ESPreventAutoTruncate'}
|
||||
) == 1
|
||||
&& say $out "Renamed system preference 'ESPreventAutoTruncate' to 'ElasticsearchPreventAutoTruncate'";
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue