View | Details | Raw Unified | Return to bug 19670
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_19670.perl (+13 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    my $table_sth = $dbh->prepare('SHOW CREATE TABLE `search_marc_map`');
4
    $table_sth->execute();
5
    my @table = $table_sth->fetchrow_array();
6
    unless ( $table[1] =~ /`marc_field`.*COLLATE utf8mb4_bin/ ) { #catches utf8mb4 collated tables
7
        $dbh->do("ALTER TABLE `search_marc_map` MODIFY `marc_field` VARCHAR(255) NOT NULL COLLATE utf8mb4_bin COMMENT 'the MARC specifier for this field'");
8
    }
9
10
    # Always end with this (adjust the bug info)
11
    SetVersion( $DBversion );
12
	print "Upgrade to $DBversion done (Bug 19670 - Change collation of marc_field to allow mixed case search field mappings)\n";
13
}
(-)a/installer/data/mysql/kohastructure.sql (-2 / +1 lines)
Lines 1491-1497 CREATE TABLE `search_marc_map` ( Link Here
1491
  id int(11) NOT NULL AUTO_INCREMENT,
1491
  id int(11) NOT NULL AUTO_INCREMENT,
1492
  index_name ENUM('biblios','authorities') NOT NULL COMMENT 'what storage index this map is for',
1492
  index_name ENUM('biblios','authorities') NOT NULL COMMENT 'what storage index this map is for',
1493
  marc_type ENUM('marc21', 'unimarc', 'normarc') NOT NULL COMMENT 'what MARC type this map is for',
1493
  marc_type ENUM('marc21', 'unimarc', 'normarc') NOT NULL COMMENT 'what MARC type this map is for',
1494
  marc_field VARCHAR(255) NOT NULL COMMENT 'the MARC specifier for this field',
1494
  marc_field VARCHAR(255) NOT NULL COLLATE utf8mb4_bin COMMENT 'the MARC specifier for this field',
1495
  PRIMARY KEY(`id`),
1495
  PRIMARY KEY(`id`),
1496
  UNIQUE key `index_name` (`index_name`, `marc_field` (191), `marc_type`),
1496
  UNIQUE key `index_name` (`index_name`, `marc_field` (191), `marc_type`),
1497
  INDEX (`index_name`)
1497
  INDEX (`index_name`)
1498
- 

Return to bug 19670