From 6e40964a713cb6aa556bf179381740f137be6aa2 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 23 Sep 2022 09:03:50 -0300 Subject: [PATCH] Bug 23735: New atomicupdate syntax Signed-off-by: Tomas Cohen Arazi https://bugs.koha-community.org/show_bug.cgi?id=25375 --- installer/data/mysql/atomicupdate/bug-25375.perl | 9 --------- installer/data/mysql/atomicupdate/bug_25375.pl | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 9 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug-25375.perl create mode 100644 installer/data/mysql/atomicupdate/bug_25375.pl diff --git a/installer/data/mysql/atomicupdate/bug-25375.perl b/installer/data/mysql/atomicupdate/bug-25375.perl deleted file mode 100644 index 7de5ce51e7e..00000000000 --- a/installer/data/mysql/atomicupdate/bug-25375.perl +++ /dev/null @@ -1,9 +0,0 @@ -$DBversion = 'XXX'; -if( CheckVersion( $DBversion ) ) { - $dbh->do(qq{ - INSERT IGNORE INTO search_field (name, label, type) - VALUES ('available', 'available', 'boolean') - }); - - NewVersion( $DBversion, '25735', "Add Elasticsearch field 'available'"); -} diff --git a/installer/data/mysql/atomicupdate/bug_25375.pl b/installer/data/mysql/atomicupdate/bug_25375.pl new file mode 100644 index 00000000000..c022d5e1a00 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_25375.pl @@ -0,0 +1,15 @@ +use Modern::Perl; + +return { + bug_number => "25735", + description => "Add Elasticsearch field 'available'", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $dbh->do(qq{ + INSERT IGNORE INTO search_field (name, label, type) + VALUES ('available', 'available', 'boolean') + }); + }, +}; -- 2.34.1