Fix: Corrige la cl unique sur les commandes fournisseurs.
This commit is contained in:
parent
18751c72c1
commit
e7ba142fde
@ -752,3 +752,7 @@ update llx_product_fournisseur_price set unitprice = ROUND(price/quantity,8) whe
|
||||
update llx_fichinter set tms=datec where tms < datec;
|
||||
update llx_fichinter set tms=date_valid where tms < date_valid;
|
||||
|
||||
ALTER TABLE llx_commande_fournisseur DROP INDEX ref;
|
||||
ALTER TABLE llx_commande_fournisseur ADD UNIQUE INDEX uk_commande_fournisseur_ref (ref, fk_soc);
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2006-2007 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
|
||||
@ -24,5 +24,7 @@
|
||||
-- Supprimme orphelins pour permettre montée de la clé
|
||||
-- V4 DELETE llx_commande_fournisseur FROM llx_commande_fournisseur LEFT JOIN llx_societe ON llx_commande_fournisseur.fk_soc = llx_societe.rowid WHERE llx_societe.rowid IS NULL;
|
||||
|
||||
ALTER TABLE llx_commande_fournisseur ADD UNIQUE INDEX uk_commande_fournisseur_ref (ref, fk_soc);
|
||||
|
||||
ALTER TABLE llx_commande_fournisseur ADD INDEX idx_commande_fournisseur_fk_soc (fk_soc);
|
||||
ALTER TABLE llx_commande_fournisseur ADD CONSTRAINT fk_commande_fournisseur_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2007 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
|
||||
@ -47,7 +48,5 @@ create table llx_commande_fournisseur
|
||||
note_public text,
|
||||
model_pdf varchar(50),
|
||||
|
||||
fk_methode_commande integer default 0,
|
||||
|
||||
UNIQUE INDEX (ref)
|
||||
fk_methode_commande integer default 0
|
||||
)type=innodb;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
-- ===========================================================================
|
||||
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2007 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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user