From 38db9932d2df0895b0f542525e539f95c4dc7903 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Thu, 28 Apr 2022 14:01:52 +0000 Subject: [PATCH] Bug 13142: (QA follow-up) Convert database update to current format https://bugs.koha-community.org/show_bug.cgi?id=13412 Signed-off-by: Fridolin Somers --- ...g_13412-add_GenerateAuthorityField_syspref.pl | 16 ++++++++++++++++ ..._13412-add_GenerateAuthorityField_syspref.sql | 3 --- 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100755 installer/data/mysql/atomicupdate/bug_13412-add_GenerateAuthorityField_syspref.pl delete mode 100644 installer/data/mysql/atomicupdate/bug_13412-add_GenerateAuthorityField_syspref.sql diff --git a/installer/data/mysql/atomicupdate/bug_13412-add_GenerateAuthorityField_syspref.pl b/installer/data/mysql/atomicupdate/bug_13412-add_GenerateAuthorityField_syspref.pl new file mode 100755 index 0000000000..49e37e6aa2 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_13412-add_GenerateAuthorityField_syspref.pl @@ -0,0 +1,16 @@ +use Modern::Perl; + +return { + bug_number => "13412", + description => "Add GenerateAuthorityField667 and GenerateAuthorityField670 system preferences", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $dbh->do(q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES + ( 'GenerateAuthorityField667', 'Machine generated authority record', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 667$a field of MARC21 records', 'free' ), + ( 'GenerateAuthorityField670', 'Work cat.', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 670$a field of MARC21 records', 'free' ) + }); + }, +}; diff --git a/installer/data/mysql/atomicupdate/bug_13412-add_GenerateAuthorityField_syspref.sql b/installer/data/mysql/atomicupdate/bug_13412-add_GenerateAuthorityField_syspref.sql deleted file mode 100644 index f4c5ec7588..0000000000 --- a/installer/data/mysql/atomicupdate/bug_13412-add_GenerateAuthorityField_syspref.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES -( 'GenerateAuthorityField667', 'Machine generated authority record', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 667$a field of MARC21 records', 'free' ), -( 'GenerateAuthorityField670', 'Work cat.', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 670$a field of MARC21 records', 'free' ) -- 2.39.5