From e8a04d72e852eb51bc2e215cb09dc38827fba891 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 3 Feb 2009 00:06:45 +0000 Subject: [PATCH] Add protection against bad entries in llx_categorie_association --- mysql/migration/2.5.0-2.6.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/migration/2.5.0-2.6.0.sql b/mysql/migration/2.5.0-2.6.0.sql index b2462ded8b5..6cb36fc9515 100644 --- a/mysql/migration/2.5.0-2.6.0.sql +++ b/mysql/migration/2.5.0-2.6.0.sql @@ -63,6 +63,6 @@ delete from llx_categorie_association where fk_categorie_mere = fk_categorie_fil -- Put at the end. Cas have duplicate values -ALTER TABLE llx_categorie_association drop index idx_categorie_association_fk_categorie_fille +ALTER TABLE llx_categorie_association drop index idx_categorie_association_fk_categorie_fille; ALTER TABLE llx_categorie_association ADD UNIQUE INDEX uk_categorie_association (fk_categorie_mere, fk_categorie_fille); ALTER TABLE llx_categorie_association ADD UNIQUE INDEX uk_categorie_association_fk_categorie_fille (fk_categorie_fille);