Bug 23204: DBRev 19.12.00.060
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 27 Mar 2020 12:32:14 +0000 (12:32 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 27 Mar 2020 12:32:14 +0000 (12:32 +0000)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Koha.pm
installer/data/mysql/atomicupdate/Bug_23204_change_search_marc_map_enum_order.perl [deleted file]
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 82c8c9f..bc6030b 100644 (file)
--- 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 (file)
index c5493b4..0000000
+++ /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");
-}
index 40dd796..4308bcd 100644 (file)
@@ -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`),
index 3230918..bbf268f 100755 (executable)
@@ -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/';