From e684fac28dee49184339a05b9372d9152c1955a9 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 27 Mar 2020 12:32:14 +0000 Subject: [PATCH] Bug 23204: DBRev 19.12.00.060 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- .../Bug_23204_change_search_marc_map_enum_order.perl | 7 ------- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 8 ++++++++ 4 files changed, 10 insertions(+), 9 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/Bug_23204_change_search_marc_map_enum_order.perl diff --git a/Koha.pm b/Koha.pm index 82c8c9fc43..bc6030bc57 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 = "19.12.00.059"; +$VERSION = "19.12.00.060"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/Bug_23204_change_search_marc_map_enum_order.perl b/installer/data/mysql/atomicupdate/Bug_23204_change_search_marc_map_enum_order.perl deleted file mode 100644 index c5493b4d77..0000000000 --- a/installer/data/mysql/atomicupdate/Bug_23204_change_search_marc_map_enum_order.perl +++ /dev/null @@ -1,7 +0,0 @@ -$DBversion = 'XXX'; -if( CheckVersion( $DBversion ) ) { - $dbh->do(q{ - ALTER TABLE search_marc_map CHANGE marc_type `marc_type` enum('marc21','normarc','unimarc') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'what MARC type this map is for'; - }); - NewVersion( $DBversion, 23204, "Change enum order for marc_type in search_marc_map to fix sorting"); -} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 40dd796b9a..4308bcdc21 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1394,7 +1394,7 @@ DROP TABLE IF EXISTS search_marc_map; CREATE TABLE `search_marc_map` ( id int(11) NOT NULL AUTO_INCREMENT, index_name ENUM('biblios','authorities') NOT NULL COMMENT 'what storage index this map is for', - marc_type ENUM('marc21', 'unimarc', 'normarc') NOT NULL COMMENT 'what MARC type this map is for', + marc_type ENUM('marc21', 'unimarc', 'normarc') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'what MARC type this map is for', marc_field VARCHAR(255) NOT NULL COLLATE utf8mb4_bin COMMENT 'the MARC specifier for this field', PRIMARY KEY(`id`), UNIQUE key `index_name` (`index_name`, `marc_field` (191), `marc_type`), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 3230918899..bbf268fd67 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -21389,6 +21389,14 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 18177, "Remove some unused columns from aqbooksellers"); } +$DBversion = '19.12.00.060'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + ALTER TABLE search_marc_map CHANGE marc_type `marc_type` enum('marc21','normarc','unimarc') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'what MARC type this map is for'; + }); + NewVersion( $DBversion, 23204, "Change enum order for marc_type in search_marc_map to fix sorting"); +} + # 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