From c5a8c3529210c14cd51f51da483d8626c20340e2 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 Signed-off-by: Bob Bennhoff --- ...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..a79fcea66c --- /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