From 482d77b536ed89b9c6b354ab50dfb4a86fa472ca Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 1 Mar 2021 14:10:39 +0000 Subject: [PATCH] Bug 27316: DBRev 20.12.00.015 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../mysql/atomicupdate/bug_23716_update_sort_mappings.perl | 6 ------ installer/data/mysql/updatedatabase.pl | 7 +++++++ 3 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_23716_update_sort_mappings.perl diff --git a/Koha.pm b/Koha.pm index e549ba9b26..29e41d2054 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.014"; +$VERSION = "20.12.00.015"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_23716_update_sort_mappings.perl b/installer/data/mysql/atomicupdate/bug_23716_update_sort_mappings.perl deleted file mode 100644 index b1c41bc065..0000000000 --- a/installer/data/mysql/atomicupdate/bug_23716_update_sort_mappings.perl +++ /dev/null @@ -1,6 +0,0 @@ -$DBversion = 'XXX'; -if( CheckVersion( $DBversion ) ) { - $dbh->do( "UPDATE search_marc_to_field SET sort = 1 WHERE sort IS NULL" ); - $dbh->do( "ALTER TABLE search_marc_to_field MODIFY COLUMN sort tinyint(1) DEFAULT 1 NOT NULL COMMENT 'Sort defaults to 1 (Yes) and creates sort fields in the index, 0 (no) will prevent this'" ); - NewVersion( $DBversion, 27316, "In Elastisearch mappings convert NULL (Undef) for sort to 1 (Yes)"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index c67f591d4a..abb706768b 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -23531,6 +23531,13 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 7806, "Remove remaining possible 0000-00-00 values"); } +$DBversion = '20.12.00.015'; +if( CheckVersion( $DBversion ) ) { + $dbh->do( "UPDATE search_marc_to_field SET sort = 1 WHERE sort IS NULL" ); + $dbh->do( "ALTER TABLE search_marc_to_field MODIFY COLUMN sort tinyint(1) DEFAULT 1 NOT NULL COMMENT 'Sort defaults to 1 (Yes) and creates sort fields in the index, 0 (no) will prevent this'" ); + NewVersion( $DBversion, 27316, "In Elastisearch mappings convert NULL (Undef) for sort to 1 (Yes)"); +} + # 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.39.5