Qual: Uniformize index name to match

http://wiki.dolibarr.org/index.php/Language_and_development_rules#SQL_rules
This commit is contained in:
Laurent Destailleur 2014-01-31 10:08:25 +01:00
parent 470f88bacd
commit bb7fc8631b
3 changed files with 28 additions and 4 deletions

View File

@ -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;
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);

View File

@ -0,0 +1,19 @@
-- ========================================================================
-- Copyright (C) 2014 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- 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 <http://www.gnu.org/licenses/>.
--
-- ========================================================================
ALTER TABLE llx_c_tva ADD UNIQUE INDEX uk_c_tva_id (fk_pays, taux, recuperableonly);

View File

@ -1,6 +1,5 @@
-- ========================================================================
-- Copyright (C) 2005 Patrick Rouillon <patrick.rouillon.net>
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2014 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- 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);