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

(-)a/installer/data/mysql/db_revs/210600012.pl (-1 / +20 lines)
Lines 24-29 return { Link Here
24
        };
24
        };
25
25
26
        if( !unique_key_exists( 'language_descriptions', 'uniq_desc' ) ) {
26
        if( !unique_key_exists( 'language_descriptions', 'uniq_desc' ) ) {
27
28
            $dbh->do(q{
29
                DELETE a
30
                FROM language_descriptions AS a, language_descriptions AS b
31
                WHERE a.id < b.id
32
                AND a.subtag IS NOT NULL
33
                AND a.subtag=b.subtag
34
                AND a.lang IS NOT NULL
35
                AND a.lang=b.lang
36
                AND a.type=b.type
37
            });
27
            $dbh->do(q{
38
            $dbh->do(q{
28
                ALTER TABLE language_descriptions
39
                ALTER TABLE language_descriptions
29
                ADD UNIQUE KEY uniq_desc (subtag, type, lang)
40
                ADD UNIQUE KEY uniq_desc (subtag, type, lang)
Lines 31-36 return { Link Here
31
        };
42
        };
32
43
33
        if( !unique_key_exists( 'language_rfc4646_to_iso639', 'uniq_code' ) ) {
44
        if( !unique_key_exists( 'language_rfc4646_to_iso639', 'uniq_code' ) ) {
45
46
            $dbh->do(q{
47
                DELETE a
48
                FROM language_rfc4646_to_iso639 AS a, language_rfc4646_to_iso639 AS b
49
                WHERE a.id < b.id
50
                AND a.rfc4646_subtag IS NOT NULL
51
                AND a.rfc4646_subtag=b.rfc4646_subtag
52
                AND a.iso639_2_code=b.iso639_2_code
53
            });
34
            $dbh->do(q{
54
            $dbh->do(q{
35
                ALTER TABLE language_rfc4646_to_iso639
55
                ALTER TABLE language_rfc4646_to_iso639
36
                ADD UNIQUE KEY uniq_code (rfc4646_subtag, iso639_2_code)
56
                ADD UNIQUE KEY uniq_code (rfc4646_subtag, iso639_2_code)
37
- 

Return to bug 29631