From ec33c4a999a4138300f47b2259933988601042bb Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 14 Mar 2011 09:42:32 +0000 Subject: [PATCH] Fix: compatibility with postgresql --- htdocs/install/mysql/migration/2.9.0-3.0.0.sql | 3 ++- htdocs/install/mysql/tables/llx_societe_remise.sql | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/install/mysql/migration/2.9.0-3.0.0.sql b/htdocs/install/mysql/migration/2.9.0-3.0.0.sql index de6f0f96f1d..74410774b51 100644 --- a/htdocs/install/mysql/migration/2.9.0-3.0.0.sql +++ b/htdocs/install/mysql/migration/2.9.0-3.0.0.sql @@ -9,7 +9,6 @@ -- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60); -- To change type of field: ALTER TABLE llx_table MODIFY name varchar(60); -- To remove a column: ALTER TABLE llx_table DROP COLUMN colname; --- ALTER TABLE llx_paiement MODIFY amount double(24,8); ALTER TABLE llx_paiement_facture MODIFY amount double(24,8); @@ -168,3 +167,5 @@ UPDATE llx_c_type_contact set module='order_supplier' WHERE module='supplier_ord ALTER TABLE llx_facturedet DROP INDEX uk_fk_remise_except; ALTER TABLE llx_facturedet ADD UNIQUE INDEX uk_fk_remise_except (fk_remise_except, fk_facture); + +ALTER TABLE llx_societe_remise MODIFY remise_client double(6,3) DEFAULT 0 NOT NULL; diff --git a/htdocs/install/mysql/tables/llx_societe_remise.sql b/htdocs/install/mysql/tables/llx_societe_remise.sql index bf25afb7a50..c171e7a1f32 100644 --- a/htdocs/install/mysql/tables/llx_societe_remise.sql +++ b/htdocs/install/mysql/tables/llx_societe_remise.sql @@ -1,5 +1,6 @@ -- ======================================================================== -- Copyright (C) 2000-2004 Rodolphe Quiedeville +-- Copyright (C) 2011 Regis Houssin -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -26,8 +27,8 @@ create table llx_societe_remise fk_soc integer NOT NULL, tms timestamp, datec datetime, -- creation date - fk_user_author integer, -- utilisateur qui a créé l'info - remise_client real DEFAULT 0, -- remise systématique pour le client + fk_user_author integer, -- creation user + remise_client double(6,3) DEFAULT 0 NOT NULL, -- discount note text )type=innodb;