From 24df8530646562ea76ee79faf7c83c8f94e691eb Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 1 Mar 2021 14:10:40 +0000 Subject: [PATCH] Bug 8976: DBRev 20.12.00.016 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_8976.perl | 20 ------------------- installer/data/mysql/updatedatabase.pl | 20 +++++++++++++++++++ 3 files changed, 21 insertions(+), 21 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_8976.perl diff --git a/Koha.pm b/Koha.pm index 29e41d2054..914064a04a 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.015"; +$VERSION = "20.12.00.016"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_8976.perl b/installer/data/mysql/atomicupdate/bug_8976.perl deleted file mode 100644 index 1a7560af1e..0000000000 --- a/installer/data/mysql/atomicupdate/bug_8976.perl +++ /dev/null @@ -1,20 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - unless ( column_exists( 'marc_subfield_structure', 'display_order' ) ) { - $dbh->do(q{ - ALTER TABLE marc_subfield_structure - ADD COLUMN display_order INT(2) NOT NULL DEFAULT 0 AFTER maxlength - }); - } - - unless ( column_exists( 'auth_subfield_structure', 'display_order' ) ) { - $dbh->do(q{ - ALTER TABLE auth_subfield_structure - ADD COLUMN display_order INT(2) NOT NULL DEFAULT 0 AFTER defaultvalue - }); - } - - # Always end with this (adjust the bug info) - NewVersion( $DBversion, 8976, "Allow setting a default sequence of subfields in cataloguing editor" ); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index abb706768b..6d5b668205 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -23538,6 +23538,26 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 27316, "In Elastisearch mappings convert NULL (Undef) for sort to 1 (Yes)"); } +$DBversion = '20.12.00.016'; +if( CheckVersion( $DBversion ) ) { + + unless ( column_exists( 'marc_subfield_structure', 'display_order' ) ) { + $dbh->do(q{ + ALTER TABLE marc_subfield_structure + ADD COLUMN display_order INT(2) NOT NULL DEFAULT 0 AFTER maxlength + }); + } + + unless ( column_exists( 'auth_subfield_structure', 'display_order' ) ) { + $dbh->do(q{ + ALTER TABLE auth_subfield_structure + ADD COLUMN display_order INT(2) NOT NULL DEFAULT 0 AFTER defaultvalue + }); + } + + NewVersion( $DBversion, 8976, "Allow setting a default sequence of subfields in cataloguing editor" ); +} + # 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