diff --git a/htdocs/install/mysql/migration/2.6.0-2.7.0.sql b/htdocs/install/mysql/migration/2.6.0-2.7.0.sql index 1bd08918c50..b17cef52fdd 100644 --- a/htdocs/install/mysql/migration/2.6.0-2.7.0.sql +++ b/htdocs/install/mysql/migration/2.6.0-2.7.0.sql @@ -489,3 +489,6 @@ ALTER TABLE llx_adherent_options CHANGE adhid fk_member integer NOT NULL; ALTER TABLE llx_adherent_options ADD INDEX idx_adherent_options (fk_member); ALTER TABLE llx_adherent DROP INDEX idx_adherent_fk_soc; + +ALTER TABLE llx_propaldet ADD INDEX idx_propaldet_fk_propal (fk_propal); +ALTER TABLE llx_propaldet ADD CONSTRAINT fk_propaldet_fk_propal FOREIGN KEY (fk_propal) REFERENCES llx_propal (rowid); diff --git a/htdocs/install/mysql/tables/llx_commandedet.key.sql b/htdocs/install/mysql/tables/llx_commandedet.key.sql index bcff099f035..a94e26c9ee1 100644 --- a/htdocs/install/mysql/tables/llx_commandedet.key.sql +++ b/htdocs/install/mysql/tables/llx_commandedet.key.sql @@ -19,8 +19,6 @@ -- =================================================================== --- Supprimme orhpelins pour permettre montée de la clé --- V4 DELETE llx_commandedet FROM llx_commandedet LEFT JOIN llx_commande ON llx_commandedet.fk_commande = llx_commande.rowid WHERE llx_commande.rowid IS NULL; ALTER TABLE llx_commandedet ADD INDEX idx_commandedet_fk_commande (fk_commande); --- V4 ALTER TABLE llx_commandedet ADD CONSTRAINT fk_commandedet_fk_commande FOREIGN KEY (fk_commande) REFERENCES llx_commande (rowid); +ALTER TABLE llx_commandedet ADD CONSTRAINT fk_commandedet_fk_commande FOREIGN KEY (fk_commande) REFERENCES llx_commande (rowid); diff --git a/htdocs/install/mysql/tables/llx_commandedet.sql b/htdocs/install/mysql/tables/llx_commandedet.sql index 176b973c9eb..52317c12306 100644 --- a/htdocs/install/mysql/tables/llx_commandedet.sql +++ b/htdocs/install/mysql/tables/llx_commandedet.sql @@ -32,9 +32,9 @@ create table llx_commandedet fk_remise_except integer NULL, -- Lien vers table des remises fixes price real, -- prix final subprice double(24,8) DEFAULT 0, -- prix unitaire - total_ht double(24,8) DEFAULT 0, -- Total HT de la ligne toute quantit� et incluant remise ligne et globale - total_tva double(24,8) DEFAULT 0, -- Total TVA de la ligne toute quantit� et incluant remise ligne et globale - total_ttc double(24,8) DEFAULT 0, -- Total TTC de la ligne toute quantit� et incluant remise ligne et globale + total_ht double(24,8) DEFAULT 0, -- Total HT de la ligne toute quantite et incluant remise ligne et globale + total_tva double(24,8) DEFAULT 0, -- Total TVA de la ligne toute quantite et incluant remise ligne et globale + total_ttc double(24,8) DEFAULT 0, -- Total TTC de la ligne toute quantite et incluant remise ligne et globale product_type integer DEFAULT 0, date_start datetime DEFAULT NULL, -- date debut si service date_end datetime DEFAULT NULL, -- date fin si service diff --git a/htdocs/install/mysql/tables/llx_propaldet.key.sql b/htdocs/install/mysql/tables/llx_propaldet.key.sql new file mode 100644 index 00000000000..8b45e7693af --- /dev/null +++ b/htdocs/install/mysql/tables/llx_propaldet.key.sql @@ -0,0 +1,24 @@ +-- =================================================================== +-- Copyright (C) 2009 Regis Houssin +-- +-- 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 2 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, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- =================================================================== + + + +ALTER TABLE llx_propaldet ADD INDEX idx_propaldet_fk_propal (fk_propal); +ALTER TABLE llx_propaldet ADD CONSTRAINT fk_propaldet_fk_propal FOREIGN KEY (fk_propal) REFERENCES llx_propal (rowid); diff --git a/htdocs/install/mysql/tables/llx_propaldet.sql b/htdocs/install/mysql/tables/llx_propaldet.sql index f218c7f07b0..9a0377c7aaf 100644 --- a/htdocs/install/mysql/tables/llx_propaldet.sql +++ b/htdocs/install/mysql/tables/llx_propaldet.sql @@ -31,9 +31,9 @@ create table llx_propaldet remise real DEFAULT 0, -- montant de la remise (obsolete) price real, -- prix final (obsolete) subprice double(24,8) DEFAULT 0, -- prix unitaire article - total_ht double(24,8) DEFAULT 0, -- Total HT de la ligne toute quantit� et incluant remise ligne et globale - total_tva double(24,8) DEFAULT 0, -- Total TVA de la ligne toute quantit� et incluant remise ligne et globale - total_ttc double(24,8) DEFAULT 0, -- Total TTC de la ligne toute quantit� et incluant remise ligne et globale + total_ht double(24,8) DEFAULT 0, -- Total HT de la ligne toute quantite et incluant remise ligne et globale + total_tva double(24,8) DEFAULT 0, -- Total TVA de la ligne toute quantite et incluant remise ligne et globale + total_ttc double(24,8) DEFAULT 0, -- Total TTC de la ligne toute quantite et incluant remise ligne et globale product_type integer DEFAULT 0, date_start datetime DEFAULT NULL, -- date debut si service date_end datetime DEFAULT NULL, -- date fin si service