From 920c0596886a1d68ce3d9803371a77804ce736e0 Mon Sep 17 00:00:00 2001
From: Regis Houssin <regis@dolibarr.fr>
Date: Sun, 9 Mar 2008 15:53:41 +0000
Subject: [PATCH] Fix: erreur lors de la migration

---
 mysql/migration/2.2.0-2.4.0.sql | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mysql/migration/2.2.0-2.4.0.sql b/mysql/migration/2.2.0-2.4.0.sql
index 793de5be2fa..6cefa7b5734 100644
--- a/mysql/migration/2.2.0-2.4.0.sql
+++ b/mysql/migration/2.2.0-2.4.0.sql
@@ -73,6 +73,7 @@ alter table llx_expedition add column fk_soc integer NOT NULL after ref;
 alter table llx_expedition add column fk_adresse_livraison integer DEFAULT NULL after date_expedition;
 -- V4.1 UPDATE llx_expedition as e SET e.fk_soc = (SELECT c.fk_soc FROM llx_commande AS c WHERE e.fk_commande = c.rowid);
 -- V4.1 UPDATE llx_expedition as e SET e.fk_adresse_livraison = (SELECT c.fk_adresse_livraison FROM llx_commande AS c WHERE e.fk_commande = c.rowid);
+update llx_expedition set fk_adresse_livraison=NULL where fk_adresse_livraison = 0;
 
 ALTER TABLE llx_expedition ADD INDEX idx_expedition_fk_soc (fk_soc);
 ALTER TABLE llx_expedition ADD INDEX idx_expedition_fk_user_author (fk_user_author);
-- 
GitLab