diff --git a/htdocs/install/mysql/migration/2.6.0-2.7.0.sql b/htdocs/install/mysql/migration/2.6.0-2.7.0.sql
index b17cef52fddcbbe5b30deb3a65c5af3ff7e62f83..09b9f8e5f79989a81446b8e3fe9a5a35c94d6a93 100644
--- a/htdocs/install/mysql/migration/2.6.0-2.7.0.sql
+++ b/htdocs/install/mysql/migration/2.6.0-2.7.0.sql
@@ -203,6 +203,7 @@ ALTER TABLE llx_adherent_type ADD UNIQUE INDEX uk_adherent_type_libelle (libelle
 ALTER TABLE llx_adherent_options_label ADD UNIQUE INDEX uk_adherent_options_label_name (name, entity);
 
 ALTER TABLE llx_projet ADD INDEX idx_projet_fk_soc (fk_soc);
+-- V4.1 update llx_projet set fk_soc=null where fk_soc is not null and fk_soc not in (select rowid from llx_societe);
 ALTER TABLE llx_projet ADD CONSTRAINT fk_projet_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);