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

(-)a/installer/data/mysql/atomicupdate/bug_29605.pl (+27 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "29605",
5
    description => "Add language_script_mapping primary key",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh) = @$args{qw(dbh)};
9
10
        if (   !primary_key_exists( 'language_script_mapping', 'language_subtag' )
11
            and index_exists( 'language_script_mapping', 'language_subtag' ) ) {
12
13
            $dbh->do(q{
14
                ALTER TABLE language_script_mapping
15
                    DROP KEY `language_subtag`;
16
            });
17
        }
18
19
        if ( !primary_key_exists( 'language_script_mapping', 'language_subtag' ) ) {
20
21
            $dbh->do(q{
22
                ALTER TABLE language_script_mapping
23
                    ADD PRIMARY KEY `language_subtag` (`language_subtag`);
24
            });
25
        }
26
    },
27
}
(-)a/installer/data/mysql/kohastructure.sql (-2 / +1 lines)
Lines 3261-3267 DROP TABLE IF EXISTS `language_script_mapping`; Link Here
3261
CREATE TABLE `language_script_mapping` (
3261
CREATE TABLE `language_script_mapping` (
3262
  `language_subtag` varchar(25) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
3262
  `language_subtag` varchar(25) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
3263
  `script_subtag` varchar(25) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
3263
  `script_subtag` varchar(25) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
3264
  KEY `language_subtag` (`language_subtag`)
3264
  PRIMARY KEY `language_subtag` (`language_subtag`)
3265
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3265
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3266
/*!40101 SET character_set_client = @saved_cs_client */;
3266
/*!40101 SET character_set_client = @saved_cs_client */;
3267
3267
3268
- 

Return to bug 29605