Modif en profondeur

This commit is contained in:
Rodolphe Quiedeville 2004-11-26 14:21:25 +00:00
parent d68be0ad69
commit 237fba7ed0

View File

@ -1,5 +1,5 @@
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
@ -25,16 +25,31 @@ create table llx_contrat
( (
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp, tms timestamp,
enservice smallint DEFAULT 0, datec datetime, -- date de creation de l'enregistrement
date_contrat datetime,
statut smallint DEFAULT 0,
mise_en_service datetime, mise_en_service datetime,
fin_validite datetime, fin_validite datetime,
date_cloture datetime, date_cloture datetime,
fk_soc integer NOT NULL, fk_soc integer NOT NULL,
fk_product integer NOT NULL, fk_commercial_signature integer NOT NULL,
fk_facture integer NOT NULL default 0, fk_commercial_suivi integer NOT NULL,
fk_facturedet integer NOT NULL default 0,
fk_user_author integer NOT NULL default 0, fk_user_author integer NOT NULL default 0,
fk_user_mise_en_service integer, fk_user_mise_en_service integer,
fk_user_cloture integer fk_user_cloture integer
)type=innodb; )type=innodb;
--
--
ALTER TABLE llx_contrat ADD INDEX (fk_soc);
ALTER TABLE llx_contrat ADD INDEX (fk_commercial_signature);
ALTER TABLE llx_contrat ADD INDEX (fk_commercial_suivi);
ALTER TABLE llx_contrat ADD INDEX (fk_user_author);
--
--
ALTER TABLE llx_contrat ADD FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp);
ALTER TABLE llx_contrat ADD FOREIGN KEY (fk_commercial_signature) REFERENCES llx_user (rowid);
ALTER TABLE llx_contrat ADD FOREIGN KEY (fk_commercial_suivi) REFERENCES llx_user (rowid);
ALTER TABLE llx_contrat ADD FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);