From dced52dc5c2c833829177aef08ff572a93f8cf09 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 23 Sep 2022 09:03:50 -0300 Subject: [PATCH] Bug 25375: New atomicupdate syntax Signed-off-by: Tomas Cohen Arazi (cherry picked from commit c86d7f632fdcfb309151e094e5794bd9c09be290) Signed-off-by: Lucas Gass (cherry picked from commit 91c201ac2a5de9625bb161911d48337a82b9f48a) Signed-off-by: Arthur Suzuki --- 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 7de5ce51e7..0000000000 --- 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 0000000000..c022d5e1a0 --- /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.39.5