From 9654c4f16856527eacb8c801e0cb4618a205bc44 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Sep 2017 13:29:48 +0200 Subject: [PATCH] New extrafields are visible into list by default --- htdocs/install/mysql/migration/6.0.0-7.0.0.sql | 2 ++ htdocs/install/mysql/tables/llx_extrafields.sql | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql index e1af6e30de5..a34b5e8cab6 100644 --- a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql +++ b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql @@ -264,6 +264,8 @@ ALTER TABLE llx_extrafields ADD COLUMN tms timestamp; -- We fix value of 'list' fro m0 to 1 for all extrafields created before this migration UPDATE llx_extrafields SET list = 1 WHERE list = 0 AND fk_user_author IS NULL and fk_user_modif IS NULL and datec IS NULL; +ALTER TABLE llx_extrafields MODIFY COLUMN list integer DEFAULT 1; +--VPGSQL8.2 ALTER TABLE llx_extrafields ALTER COLUMN list SET DEFAULT 1; ALTER TABLE llx_extrafields MODIFY COLUMN langs varchar(64); diff --git a/htdocs/install/mysql/tables/llx_extrafields.sql b/htdocs/install/mysql/tables/llx_extrafields.sql index 3b9a9b2d72b..548508d451d 100644 --- a/htdocs/install/mysql/tables/llx_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_extrafields.sql @@ -34,7 +34,7 @@ create table llx_extrafields pos integer DEFAULT 0, alwayseditable integer DEFAULT 0, -- 1 if field can be edited whatever is element status param text, -- extra parameters to define possible values of field - list integer DEFAULT 0, -- list of values for field that are combo lists + list integer DEFAULT 1, -- list of values for field that are combo lists langs varchar(64), -- example: fileofmymodule@mymodule ishidden integer DEFAULT 0, -- Can be foreign key of external system fk_user_author integer, -- user making creation