From 8ef3efbede073d6dc9d17114ff716fb1df566066 Mon Sep 17 00:00:00 2001 From: Axel ROGER Date: Wed, 17 Oct 2012 12:55:24 +0000 Subject: [PATCH] I forgot to create unicity on table default_subdomaines. --- install/mysql.sql | 3 ++- install/upgrades/1.1.sql | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/install/mysql.sql b/install/mysql.sql index 040857c8..1356532c 100644 --- a/install/mysql.sql +++ b/install/mysql.sql @@ -686,7 +686,8 @@ CREATE TABLE IF NOT EXISTS `default_subdomains` ( `domain_type_parameter` varchar(255) NOT NULL, `concerned` enum('BOTH','MAIN','SLAVE') NOT NULL DEFAULT 'MAIN', `enabled` boolean not null default true, - PRIMARY KEY (`id`) + PRIMARY KEY (`id`), + UNIQUE KEY `unique_row` (`sub`,`domain_type`,`domain_type_parameter`,`concerned`) ) COMMENT='Contains the defaults subdomains created on domains creation'; INSERT IGNORE INTO `default_subdomains` (`sub`, `domain_type`, `domain_type_parameter`, `concerned`) VALUES diff --git a/install/upgrades/1.1.sql b/install/upgrades/1.1.sql index 7a902992..0ccd43b1 100644 --- a/install/upgrades/1.1.sql +++ b/install/upgrades/1.1.sql @@ -208,7 +208,8 @@ CREATE TABLE IF NOT EXISTS `default_subdomains` ( `domain_type_parameter` varchar(255) NOT NULL, `concerned` enum('BOTH','MAIN','SLAVE') NOT NULL DEFAULT 'MAIN', `enabled` boolean not null default true, - PRIMARY KEY (`id`) + PRIMARY KEY (`id`), + UNIQUE KEY `unique_row` (`sub`,`domain_type`,`domain_type_parameter`,`concerned`) ) COMMENT='Contains the defaults subdomains created on domains creation'; INSERT IGNORE INTO `default_subdomains` (`sub`, `domain_type`, `domain_type_parameter`, `concerned`) VALUES