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 918606565da..f8572623848 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 @@ -6,16 +6,21 @@ -- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new; -- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol; -- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60); +-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname; -- To change type of field: ALTER TABLE llx_table MODIFY name varchar(60); -- To restrict request to Mysql version x.y use -- VMYSQLx.y -- To restrict request to Pgsql version x.y use -- VPGSQLx.y --- V4.1 DELETE FROM llx_product_fournisseur WHERE fk_product NOT IN (SELECT rowid from llx_product); --- VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user); --- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); +-- --V4.1 DELETE FROM llx_product_fournisseur WHERE fk_product NOT IN (SELECT rowid from llx_product); +-- --VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user); +-- --VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); -alter table llx_extrafields add column type varchar(8); +ALTER TABLE llx_actioncomm DROP COLUMN propalrowid; +ALTER TABLE llx_product_stock DROP COLUMN location; +ALTER TABLE llx_societe DROP COLUMN fk_barcode_type; + +ALTER TABLE llx_extrafields ADD COLUMN TYPE VARCHAR(8); UPDATE llx_c_paper_format SET active=1 WHERE active=0; diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index 84f0e32360c..16713302e6a 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -81,6 +81,7 @@ create table llx_societe localtax1_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 1 localtax2_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 2 barcode varchar(255), -- barcode + fk_barcode_type integer NULL DEFAULT 0, -- barcode type price_level integer NULL, -- level of price for multiprices default_lang varchar(6), -- default language logo varchar(255),