From 2b77a99fa3caf9c2e2890cfb1c534397711a8bf7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 21 Apr 2012 19:12:20 +0200 Subject: [PATCH] Fix: [ bug #372 ] Upgrade error from 3.1.0 to 3.2.0 Beta --- htdocs/install/mysql/migration/3.1.0-3.2.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql index b5ccfefeb4a..e35611107a5 100755 --- a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql +++ b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql @@ -213,9 +213,11 @@ ALTER TABLE llx_paiement ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowi ALTER TABLE llx_product_price ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowid; -- Restore foreign key (on llx_expedition_methode before) on correct table (llx_c_shipment_mode) +UPDATE llx_expedition SET fk_expedition_methode = null WHERE fk_expedition_methode NOT IN (SELECT rowid FROM llx_c_shipment_mode); ALTER TABLE llx_expedition DROP FOREIGN KEY fk_expedition_fk_expedition_methode; ALTER TABLE llx_expedition ADD CONSTRAINT fk_expedition_fk_expedition_methode FOREIGN KEY (fk_expedition_methode) REFERENCES llx_c_shipment_mode (rowid); + -- VMYSQL4.1 UPDATE llx_chargesociales set tms = date_creation WHERE tms = '0000-00-00 00:00:00'; ALTER TABLE llx_propal MODIFY fk_projet integer DEFAULT NULL;