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 f670993aaae87e55f2b7812f351095630025b25b..74410774b51b786a809c9bba48db198ba2e093ee 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 @@ -167,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/migration/3.0.0-3.1.0.sql b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql index 99d49b5d7d44b19a428c254202fc2af4c0dc3817..f55b8427ae9a36b2630ace85d69ea71585c54061 100755 --- a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql +++ b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql @@ -12,7 +12,7 @@ ALTER TABLE llx_adherent MODIFY login varchar(50); -ALTER TABLE llx_c_actioncomm add COLUMN position integer NOT NULL DEFAULT 0; +ALTER TABLE llx_c_actioncomm ADD COLUMN position integer NOT NULL DEFAULT 0; ALTER TABLE llx_commande_fournisseur MODIFY model_pdf varchar(255); ALTER TABLE llx_commande MODIFY model_pdf varchar(255); @@ -27,16 +27,18 @@ ALTER TABLE llx_propal MODIFY model_pdf varchar(255); -- Delete old constants -DELETE from llx_const where NAME = 'MAIN_MENU_BARRETOP'; -DELETE from llx_const where NAME = 'MAIN_MENUFRONT_BARRETOP'; -DELETE from llx_const where NAME = 'MAIN_MENU_BARRELEFT'; -DELETE from llx_const where NAME = 'MAIN_MENUFRONT_BARRELEFT'; +DELETE FROM llx_const WHERE name = 'MAIN_MENU_BARRETOP'; +DELETE FROM llx_const WHERE name = 'MAIN_MENUFRONT_BARRETOP'; +DELETE FROM llx_const WHERE name = 'MAIN_MENU_BARRELEFT'; +DELETE FROM llx_const WHERE name = 'MAIN_MENUFRONT_BARRELEFT'; -ALTER TABLE llx_facture_fourn ADD column ref_ext varchar(30) after entity; -ALTER TABLE llx_commande_fournisseur ADD column ref_ext varchar(30) after entity; +ALTER TABLE llx_facture_fourn ADD COLUMN ref_ext varchar(30) AFTER entity; +ALTER TABLE llx_commande_fournisseur ADD COLUMN ref_ext varchar(30) AFTER entity; 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 ADD column fk_currency integer DEFAULT 0 after fk_forme_juridique; +ALTER TABLE llx_societe ADD COLUMN fk_currency integer DEFAULT 0 AFTER fk_forme_juridique; + +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 a655257aa8656439dd781ea868dc9e6ccf611541..a515ba541bf72e61d8b655d14a42e16932254a39 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 <rodolphe@quiedeville.org> +-- Copyright (C) 2011 Regis Houssin <regis@dolibarr.fr> -- -- 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 @@ -27,7 +28,7 @@ create table llx_societe_remise tms timestamp, datec datetime, -- creation date fk_user_author integer, -- creation user - remise_client real DEFAULT 0, -- discount + remise_client double(6,3) DEFAULT 0 NOT NULL, -- discount note text )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_societe_remise_except.sql b/htdocs/install/mysql/tables/llx_societe_remise_except.sql index 8dbe7797e613e461766e652d534da164bf754a81..fff909a0ec8b762736b03bb5c40e9de1ee0101da 100644 --- a/htdocs/install/mysql/tables/llx_societe_remise_except.sql +++ b/htdocs/install/mysql/tables/llx_societe_remise_except.sql @@ -23,16 +23,16 @@ create table llx_societe_remise_except ( - rowid integer AUTO_INCREMENT PRIMARY KEY, - fk_soc integer NOT NULL, -- client - datec datetime, - amount_ht double(24,8) NOT NULL, - amount_tva double(24,8) DEFAULT 0 NOT NULL, - amount_ttc double(24,8) DEFAULT 0 NOT NULL, - tva_tx double(6,3) DEFAULT 0 NOT NULL, - fk_user integer NOT NULL, - fk_facture_line integer, - fk_facture integer, - fk_facture_source integer, - description varchar(255) NOT NULL + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_soc integer NOT NULL, -- client + datec datetime, + amount_ht double(24,8) NOT NULL, + amount_tva double(24,8) DEFAULT 0 NOT NULL, + amount_ttc double(24,8) DEFAULT 0 NOT NULL, + tva_tx double(6,3) DEFAULT 0 NOT NULL, + fk_user integer NOT NULL, + fk_facture_line integer, + fk_facture integer, + fk_facture_source integer, + description varchar(255) NOT NULL )ENGINE=innodb;