From b379d2cb34adaebc067a0cd2a7da679f6ccd203b Mon Sep 17 00:00:00 2001 From: Dominique Rousseau Date: Tue, 19 Jan 2016 16:14:58 +0100 Subject: [PATCH] ajout d'un alter table pour eviter les doublons dans default_subdomains - pas teste, pas sur que ca casse pas un truc - ( refs #1662 ) --- install/upgrades/3.0.0~1.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/upgrades/3.0.0~1.sql b/install/upgrades/3.0.0~1.sql index 865f0c60..f4860b5e 100644 --- a/install/upgrades/3.0.0~1.sql +++ b/install/upgrades/3.0.0~1.sql @@ -204,6 +204,9 @@ UPDATE domaines_type SET create_tmpdir=true, create_targetdir=true WHERE target= ALTER IGNORE TABLE domaines MODIFY domaine VARCHAR(255); ALTER IGNORE TABLE sub_domaines MODIFY domaine VARCHAR(255); +-- Should lthe default_subdomains table already exists, prevent the following INSERT INTO to double the entries +ALTER TABLE `default_subdomains` ADD UNIQUE KEY `unique_row` (`sub`,`domain_type`,`domain_type_parameter`,`concerned`); + -- Defaults subdomains to create when a domain is added CREATE TABLE IF NOT EXISTS `default_subdomains` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,