From cd036aa8ae3bb4a94f296f36ad7fc5a1aa5f903a Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Thu, 15 Mar 2012 20:00:11 +0100
Subject: [PATCH] Fix: pgsql compatibility

---
 htdocs/install/mysql/migration/3.1.0-3.2.0.sql | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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 08a3b7ef659..d501df6add1 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
@@ -430,6 +430,7 @@ ALTER TABLE llx_expedition DROP COLUMN billed;
 
 ALTER TABLE llx_product_fournisseur_price DROP FOREIGN KEY fk_product_fournisseur_price_fk_product_fournisseur;
 ALTER TABLE llx_product_fournisseur_price DROP INDEX idx_product_fournisseur_price_fk_product_fournisseur;
-ALTER TABLE llx_product_fournisseur_price DROP COLUMN fk_product_fournisseur;
-ALTER TABLE llx_product_fournisseur_price ADD COLUMN tva_tx	double(6,3) NOT NULL AFTER unitprice;
+--We keep column for the moment because we must not loose data if migrate process fails (upgrade2) to allow a second chance fix. We will delete it at next version.
+--ALTER TABLE llx_product_fournisseur_price DROP COLUMN fk_product_fournisseur;
+ALTER TABLE llx_product_fournisseur_price ADD COLUMN tva_tx	double(6,3) NOT NULL DEFAULT 0 AFTER unitprice;
  
\ No newline at end of file
-- 
GitLab