diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index 36a8f985452..067d2392941 100755 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -32,4 +32,10 @@ ALTER TABLE llx_opensurvey_sondage CHANGE COLUMN titre titre TEXT NOT NULL; ALTER TABLE llx_opensurvey_sondage CHANGE COLUMN date_fin date_fin DATETIME NOT NULL; ALTER TABLE llx_opensurvey_sondage CHANGE COLUMN format format VARCHAR(2) NOT NULL; -ALTER TABLE llx_facture_rec.sql MODIFY COLUMN usenewprice INTEGER DEFAULT 0; \ No newline at end of file +ALTER TABLE llx_facture_rec.sql MODIFY COLUMN usenewprice INTEGER DEFAULT 0; + +-- Uniformize index name to match http://wiki.dolibarr.org/index.php/Language_and_development_rules#SQL_rules +ALTER TABLE llx_c_type_contact DROP index idx_c_type_contact_uk; +ALTER TABLE llx_c_type_contact ADD UNIQUE INDEX uk_c_type_contact_id (element, source, code); +ALTER TABLE llx_c_tva ADD UNIQUE INDEX uk_c_tva_id (fk_pays, taux, recuperableonly); + diff --git a/htdocs/install/mysql/tables/llx_c_tva.key.sql b/htdocs/install/mysql/tables/llx_c_tva.key.sql new file mode 100644 index 00000000000..e1ea6d37dab --- /dev/null +++ b/htdocs/install/mysql/tables/llx_c_tva.key.sql @@ -0,0 +1,19 @@ +-- ======================================================================== +-- Copyright (C) 2014 Laurent Destailleur +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ======================================================================== + +ALTER TABLE llx_c_tva ADD UNIQUE INDEX uk_c_tva_id (fk_pays, taux, recuperableonly); diff --git a/htdocs/install/mysql/tables/llx_c_type_contact.key.sql b/htdocs/install/mysql/tables/llx_c_type_contact.key.sql index f9719fa8c6d..5a76ff0cfa6 100644 --- a/htdocs/install/mysql/tables/llx_c_type_contact.key.sql +++ b/htdocs/install/mysql/tables/llx_c_type_contact.key.sql @@ -1,6 +1,5 @@ -- ======================================================================== --- Copyright (C) 2005 Patrick Rouillon --- Copyright (C) 2005 Laurent Destailleur +-- Copyright (C) 2014 Laurent Destailleur -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -18,5 +17,5 @@ -- ======================================================================== -ALTER TABLE llx_c_type_contact ADD UNIQUE INDEX idx_c_type_contact_uk (element, source, code); +ALTER TABLE llx_c_type_contact ADD UNIQUE INDEX uk_c_type_contact_id (element, source, code);