From 5c506c66f4937bc1289ced110b0781acaa67f342 Mon Sep 17 00:00:00 2001
From: erics <erics>
Date: Tue, 12 Jul 2005 08:21:56 +0000
Subject: [PATCH] manquait la cle pour le product, ca me donnait une erreur sur
 la 1ere page de dolibarr

---
 mysql/tables/llx_contrat.key.sql | 3 +++
 mysql/tables/llx_contrat.sql     | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/mysql/tables/llx_contrat.key.sql b/mysql/tables/llx_contrat.key.sql
index b2b17e49592..f78fcf44b0a 100644
--- a/mysql/tables/llx_contrat.key.sql
+++ b/mysql/tables/llx_contrat.key.sql
@@ -31,3 +31,6 @@ ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_user_author (fk_user_author);
 
 ALTER TABLE llx_contrat ADD FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp);
 ALTER TABLE llx_contrat ADD FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
+
+ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_product (fk_product);
+ALTER TABLE llx_contrat ADD FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);
diff --git a/mysql/tables/llx_contrat.sql b/mysql/tables/llx_contrat.sql
index e9570f4521d..c87a365418c 100644
--- a/mysql/tables/llx_contrat.sql
+++ b/mysql/tables/llx_contrat.sql
@@ -37,7 +37,8 @@ create table llx_contrat
   fk_commercial_suivi     integer NOT NULL,
   fk_user_author          integer NOT NULL default 0,
   fk_user_mise_en_service integer,
-  fk_user_cloture integer
+  fk_user_cloture integer,
+  fk_product integer
 
 )type=innodb;
 
-- 
GitLab