From c96d511895f062f0896b7d910c9cbd47795a567d Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 14 Jan 2022 22:34:01 +0000 Subject: [PATCH] Bug 29887: database update --- ...ependentbranchesloggedinlibrary-sys-pref.pl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_29887-add-independentbranchesloggedinlibrary-sys-pref.pl diff --git a/installer/data/mysql/atomicupdate/bug_29887-add-independentbranchesloggedinlibrary-sys-pref.pl b/installer/data/mysql/atomicupdate/bug_29887-add-independentbranchesloggedinlibrary-sys-pref.pl new file mode 100644 index 0000000000..4c2d22eb7d --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_29887-add-independentbranchesloggedinlibrary-sys-pref.pl @@ -0,0 +1,18 @@ +use Modern::Perl; + +return { + bug_number => "29887", + description => "Add system preference IndependentBranchesLoggedInLibrary", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + # Do you stuffs here + $dbh->do(q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) + SELECT 'IndependentBranchesLoggedInLibrary', value, NULL, 'Prevent non-superlibrarians from switching logged in locations','YesNo' + FROM systempreferences WHERE variable = 'IndependentBranches' + }); + # Print useful stuff here + say $out "Bug 29887 database update finished"; + }, +} -- 2.20.1