diff --git a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql
index 424ee7463e3656fa3bb928ad645e0dcf221194d6..566e51ff7575a9f81f68bf6ed6fbefab208ca7b2 100644
--- a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql
+++ b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql
@@ -28,7 +28,7 @@ ALTER TABLE llx_user DROP COLUMN phenix_pass;
 
 ALTER TABLE llx_societe ADD COLUMN fk_account integer;
 
-ALTER TABLE llx_commandedet ADD COLUMN fk_commandefourndet	integer NOT NULL after import_key;   -- link to detail line of commande fourn (resplenish)
+ALTER TABLE llx_commandedet ADD COLUMN fk_commandefourndet	integer DEFAULT NULL after import_key;   -- link to detail line of commande fourn (resplenish)
 
 ALTER TABLE llx_website ADD COLUMN virtualhost varchar(255) after fk_default_home;
 
diff --git a/htdocs/install/mysql/tables/llx_commandedet.sql b/htdocs/install/mysql/tables/llx_commandedet.sql
index ee407fe9cff73d29a29c92788c489e30a589e407..913351ef2f8b7bc577d94e8b55ad80199bdd2ced 100644
--- a/htdocs/install/mysql/tables/llx_commandedet.sql
+++ b/htdocs/install/mysql/tables/llx_commandedet.sql
@@ -57,7 +57,7 @@ create table llx_commandedet
   fk_unit            integer      DEFAULT NULL,           -- lien vers table des unités
   import_key					varchar(14),
   
-  fk_commandefourndet					integer NOT NULL,       -- link to detail line of commande fourn (resplenish)
+  fk_commandefourndet			integer DEFAULT NULL,       -- link to detail line of commande fourn (resplenish)
   
   fk_multicurrency		integer,
   multicurrency_code			varchar(255),