From d1b6ef3270e7ae609f2449bd0b6d404c10cc3585 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 28 Feb 2018 11:22:15 -0300 Subject: [PATCH] Bug 20307: Update the localization unique key --- installer/data/mysql/atomicupdate/bug_20307.sql | 3 ++- installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_20307.sql b/installer/data/mysql/atomicupdate/bug_20307.sql index afaee63181..05ad215edf 100644 --- a/installer/data/mysql/atomicupdate/bug_20307.sql +++ b/installer/data/mysql/atomicupdate/bug_20307.sql @@ -1,2 +1,3 @@ alter table localization add column interface varchar(30) default null after entity; - +alter table localization drop constraint entity_code_lang; +alter table localization add unique key entity_code_interface_lang (entity, code, interface, lang); diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index cdabcd1f19..b5531f608b 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3721,7 +3721,7 @@ CREATE TABLE `localization` ( lang varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL, -- could be a foreign key translation MEDIUMTEXT COLLATE utf8mb4_unicode_ci, PRIMARY KEY (localization_id), - UNIQUE KEY `entity_code_lang` (`entity`,`code`,`lang`) + UNIQUE KEY `entity_code_interface_lang` (`entity`,`code`,`interface`,`lang`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- 2.11.0