From d331b6de455c289989929b41bfd80725e85a3b6b Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 9 Sep 2016 09:06:51 +0000 Subject: [PATCH] Bug 7045 - Fix DBRev 16.06.00.016 Signed-off-by: Kyle M Hall --- installer/data/mysql/updatedatabase.pl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index cd00164896..ffe2bece69 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -12835,7 +12835,16 @@ if ( CheckVersion($DBversion) ) { $DBversion = "16.06.00.016"; if ( CheckVersion($DBversion) ) { $dbh->do(q{ - INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('OPACSuggestionMandatoryFields','title','','Define the mandatory fields for a patron purchase suggestions made via OPAC.','multiple'); + update marc_subfield_structure set defaultvalue=REPLACE(defaultvalue, 'YYYY', '<>') where defaultvalue like "%YYYY%" and defaultvalue not like "%<>%"; + }); + $dbh->do(q{ + update marc_subfield_structure set defaultvalue=REPLACE(defaultvalue, 'MM', '<>') where defaultvalue like "%MM%" and defaultvalue not like "%<>%"; + }); + $dbh->do(q{ + update marc_subfield_structure set defaultvalue=REPLACE(defaultvalue, 'DD', '<
>') where defaultvalue like "%DD%" and defaultvalue not like "%<
>%"; + }); + $dbh->do(q{ + update marc_subfield_structure set defaultvalue=REPLACE(defaultvalue, 'user', '<>') where defaultvalue like "%user%" and defaultvalue not like "%<>%"; }); print "Upgrade to $DBversion done (Bug 7045 - Default-value substitution inconsistent)\n"; -- 2.39.2