From f255be3e510942ee1d0211792a4d650aaf938808 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 7 Jan 2021 14:36:20 +0000 Subject: [PATCH] Bug 27252: DBRev 20.12.00.001 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- ...ug_27252_add_ElasticsearchCrossFields_preference.perl | 9 --------- installer/data/mysql/updatedatabase.pl | 9 +++++++++ 3 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/Bug_27252_add_ElasticsearchCrossFields_preference.perl diff --git a/Koha.pm b/Koha.pm index 1a2105cd85..365c53c17a 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "20.12.00.000"; +$VERSION = "20.12.00.001"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/Bug_27252_add_ElasticsearchCrossFields_preference.perl b/installer/data/mysql/atomicupdate/Bug_27252_add_ElasticsearchCrossFields_preference.perl deleted file mode 100644 index e4cfc8145a..0000000000 --- a/installer/data/mysql/atomicupdate/Bug_27252_add_ElasticsearchCrossFields_preference.perl +++ /dev/null @@ -1,9 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - # you can use $dbh here like: - $dbh->do(q{ - INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES - ('ElasticsearchCrossFields', '1', '', 'Enable "cross_fields" option for searches using Elastic search.', 'YesNo') - }); - NewVersion( $DBversion, 27252, "Add ElasticsearchCrossFields system preference"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 8db165a434..f9a6ac177b 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -23422,6 +23422,15 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, "", "Sorry, this is my first life, I am still learning!" ); } +$DBversion = '20.12.00.001'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES + ('ElasticsearchCrossFields', '1', '', 'Enable "cross_fields" option for searches using Elastic search.', 'YesNo') + }); + NewVersion( $DBversion, 27252, "Add ElasticsearchCrossFields system preference"); +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.20.1