From 206bf7d1e8ec5f3596b57a83681a1b2aaa1a5598 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 Signed-off-by: Martin Renvoize Signed-off-by: Michal Denar Signed-off-by: Martin Renvoize --- installer/data/mysql/atomicupdate/bug_20307.sql | 2 ++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/atomicupdate/bug_20307.sql b/installer/data/mysql/atomicupdate/bug_20307.sql index 0655e771b8..05ad215edf 100644 --- a/installer/data/mysql/atomicupdate/bug_20307.sql +++ b/installer/data/mysql/atomicupdate/bug_20307.sql @@ -1 +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 1f37e04e1e..8dba4d1739 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3701,7 +3701,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.20.1