From e7a1ae08fe71fa538a79679ea390e0ffd1981e57 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Mon, 13 Feb 2023 16:09:04 +0000 Subject: [PATCH] Bug 30418: (follow-up) Fixes for QA test tools Sponsored-by: Catalyst IT, New Zealand --- Koha/Schema/Result/Virtualshelve.pm | 4 ++++ installer/data/mysql/atomicupdate/bug_30418.pl | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Koha/Schema/Result/Virtualshelve.pm b/Koha/Schema/Result/Virtualshelve.pm index 6fc6e765f0..b2cd76ec4f 100644 --- a/Koha/Schema/Result/Virtualshelve.pm +++ b/Koha/Schema/Result/Virtualshelve.pm @@ -237,5 +237,9 @@ __PACKAGE__->add_columns( '+allow_change_from_staff' => { is_boolean => 1 }, ); +__PACKAGE__->add_columns( + '+allow_change_from_permitted_staff' => { is_boolean => 1 }, +); + # You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/installer/data/mysql/atomicupdate/bug_30418.pl b/installer/data/mysql/atomicupdate/bug_30418.pl index f4c425a08c..ca346112a6 100755 --- a/installer/data/mysql/atomicupdate/bug_30418.pl +++ b/installer/data/mysql/atomicupdate/bug_30418.pl @@ -7,10 +7,10 @@ return { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; - if( !column_exists( 'virtualshelves', 'allow_change_from_permitted_staff' ) ) { - $dbh->do(q{ALTER TABLE virtualshelves ADD COLUMN `allow_change_from_permitted_staff` tinyint(1) DEFAULT '0' COMMENT 'can staff with edit_public_list_contents permission change contents?'}); + if( !column_exists( 'virtualshelves', 'allow_change_from_permitted_staff' ) ) { + $dbh->do(q{ALTER TABLE virtualshelves ADD COLUMN `allow_change_from_permitted_staff` tinyint(1) DEFAULT '0' COMMENT 'can staff with edit_public_list_contents permission change contents?'}); } - $dbh->do(q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (20, 'edit_public_list_contents', 'Edit public list contents') }); + $dbh->do(q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (20, 'edit_public_list_contents', 'Edit public list contents') }); }, }; -- 2.20.1