From a5067856b2e27f4ada864924afd8ba3d00338d87 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 14 Mar 2006 21:53:59 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20fichiers=20des=20cl=E9s=20des=20facture?= =?UTF-8?q?s=20fournisseurs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mysql/tables/llx_facture_fourn_det.key.sql | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 mysql/tables/llx_facture_fourn_det.key.sql diff --git a/mysql/tables/llx_facture_fourn_det.key.sql b/mysql/tables/llx_facture_fourn_det.key.sql new file mode 100644 index 00000000000..a97fc61c6c1 --- /dev/null +++ b/mysql/tables/llx_facture_fourn_det.key.sql @@ -0,0 +1,27 @@ +-- =================================================================== +-- Copyright (C) 2005 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 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$ +-- $Source$ +-- =================================================================== + + +-- Supprimme orhpelins pour permettre montée de la clé +--DELETE llx_facture_fourn_det FROM llx_facture_fourn_det LEFT JOIN llx_facture_fourn ON llx_facture_fourn_det.fk_facture_fourn = llx_facture_fourn.rowid WHERE llx_facture_fourn.rowid IS NULL; + +ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_facture (fk_facture_fourn); +ALTER TABLE llx_facture_fourn_det ADD CONSTRAINT fk_facture_fourn_det_fk_facture FOREIGN KEY (fk_facture_fourn) REFERENCES llx_facture_fourn (rowid);