Fix: add constraint in llx_propaldet
This commit is contained in:
parent
639eeed227
commit
43d5b6f83c
@ -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_options ADD INDEX idx_adherent_options (fk_member);
|
||||||
|
|
||||||
ALTER TABLE llx_adherent DROP INDEX idx_adherent_fk_soc;
|
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);
|
||||||
|
|||||||
@ -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);
|
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);
|
||||||
|
|||||||
@ -32,9 +32,9 @@ create table llx_commandedet
|
|||||||
fk_remise_except integer NULL, -- Lien vers table des remises fixes
|
fk_remise_except integer NULL, -- Lien vers table des remises fixes
|
||||||
price real, -- prix final
|
price real, -- prix final
|
||||||
subprice double(24,8) DEFAULT 0, -- prix unitaire
|
subprice double(24,8) DEFAULT 0, -- prix unitaire
|
||||||
total_ht double(24,8) DEFAULT 0, -- Total HT de la ligne toute quantit<EFBFBD> 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 quantit<EFBFBD> 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 quantit<EFBFBD> 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,
|
product_type integer DEFAULT 0,
|
||||||
date_start datetime DEFAULT NULL, -- date debut si service
|
date_start datetime DEFAULT NULL, -- date debut si service
|
||||||
date_end datetime DEFAULT NULL, -- date fin si service
|
date_end datetime DEFAULT NULL, -- date fin si service
|
||||||
|
|||||||
24
htdocs/install/mysql/tables/llx_propaldet.key.sql
Normal file
24
htdocs/install/mysql/tables/llx_propaldet.key.sql
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
--
|
||||||
|
-- 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);
|
||||||
@ -31,9 +31,9 @@ create table llx_propaldet
|
|||||||
remise real DEFAULT 0, -- montant de la remise (obsolete)
|
remise real DEFAULT 0, -- montant de la remise (obsolete)
|
||||||
price real, -- prix final (obsolete)
|
price real, -- prix final (obsolete)
|
||||||
subprice double(24,8) DEFAULT 0, -- prix unitaire article
|
subprice double(24,8) DEFAULT 0, -- prix unitaire article
|
||||||
total_ht double(24,8) DEFAULT 0, -- Total HT de la ligne toute quantit<EFBFBD> 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 quantit<EFBFBD> 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 quantit<EFBFBD> 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,
|
product_type integer DEFAULT 0,
|
||||||
date_start datetime DEFAULT NULL, -- date debut si service
|
date_start datetime DEFAULT NULL, -- date debut si service
|
||||||
date_end datetime DEFAULT NULL, -- date fin si service
|
date_end datetime DEFAULT NULL, -- date fin si service
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user