From 13ab25774dc30e34a8cdb90b16c370e6bdca2bb9 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 11 Feb 2021 12:31:25 +0100 Subject: [PATCH] Bug 22824: Atomic update Signed-off-by: Kyle M Hall Signed-off-by: Julian Maurice --- installer/data/mysql/atomicupdate/bug_22824.perl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_22824.perl diff --git a/installer/data/mysql/atomicupdate/bug_22824.perl b/installer/data/mysql/atomicupdate/bug_22824.perl new file mode 100644 index 0000000000..058204280a --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_22824.perl @@ -0,0 +1,16 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + UPDATE systempreferences SET type="Free" WHERE variable="OverDriveClientSecret" OR variable="RecordedBooksClientSecret" + }); + $dbh->do(q{ + UPDATE systempreferences SET type="integer" WHERE variable="UsageStats" + }); + $dbh->do(q{ + UPDATE systempreferences + SET value="0" + WHERE ( ( type = "YesNo" AND ( value NOT IN ( "1", "0" ) OR value IS NULL ) ) ) + }); + + NewVersion( $DBversion, 22824, "Update syspref values for YesNo"); +} -- 2.20.1