[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 -- ============================================================================ 2 -- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 -- Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> 4 -- 5 -- This program is free software; you can redistribute it and/or modify 6 -- it under the terms of the GNU General Public License as published by 7 -- the Free Software Foundation; either version 2 of the License, or 8 -- (at your option) any later version. 9 -- 10 -- This program is distributed in the hope that it will be useful, 11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of 12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 -- GNU General Public License for more details. 14 -- 15 -- You should have received a copy of the GNU General Public License 16 -- along with this program; if not, write to the Free Software 17 -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 -- 19 -- $Id: llx_contrat.key.sql,v 1.7 2005/12/03 17:50:57 eldy Exp $ 20 -- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_contrat.key.sql,v $ 21 -- 22 -- ============================================================================ 23 24 25 -- Supprimme orhpelins pour permettre montée de la clé 26 -- V4 DELETE llx_contratdet FROM llx_contratdet, llx_contrat LEFT JOIN llx_societe ON llx_contrat.fk_soc = llx_societe.idp WHERE llx_contratdet.fk_contrat = llx_contrat.rowid AND llx_societe.idp IS NULL; 27 -- V4 DELETE llx_contrat FROM llx_contrat LEFT JOIN llx_societe ON llx_contrat.fk_soc = llx_societe.idp WHERE llx_societe.idp IS NULL; 28 -- V4 DELETE llx_contrat FROM llx_contrat LEFT JOIN llx_user ON llx_contrat.fk_user_author = llx_user.rowid WHERE llx_user.rowid IS NULL; 29 30 ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_soc (fk_soc); 31 ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_user_author (fk_user_author); 32 33 ALTER TABLE llx_contrat ADD FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); 34 ALTER TABLE llx_contrat ADD FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |