2003-02-20 17:40:42 +00:00
-- ===================================================================
2018-10-27 12:43:12 +00:00
-- Copyright (C) 2011-2012 Regis Houssin <regis.houssin@inodbox.com>
2012-10-25 11:11:55 +00:00
-- Copyright (C) 2011-2012 Laurent Destailleur <eldy@users.sourceforge.net>
2003-02-20 17:40:42 +00:00
--
-- 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
2013-01-16 14:36:08 +00:00
-- the Free Software Foundation; either version 3 of the License, or
2003-02-20 17:40:42 +00:00
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
2019-09-23 19:55:30 +00:00
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
2003-02-20 17:40:42 +00:00
--
-- ===================================================================
2011-06-19 12:04:24 +00:00
create table llx_extrafields
2003-02-20 17:40:42 +00:00
(
2009-11-07 08:34:45 +00:00
rowid integer AUTO_INCREMENT PRIMARY KEY ,
2015-08-12 22:51:32 +00:00
name varchar ( 64 ) NOT NULL , -- name of field into extrafields tables
2017-05-24 20:48:44 +00:00
entity integer DEFAULT 1 NOT NULL , -- multi company id
elementtype varchar ( 64 ) NOT NULL DEFAULT ' member ' , -- for which element this extra fields is for
2015-08-12 22:51:32 +00:00
label varchar ( 255 ) NOT NULL , -- label to show for attribute
2008-12-18 20:32:27 +00:00
type varchar ( 8 ) ,
2012-09-13 08:14:25 +00:00
size varchar ( 8 ) DEFAULT NULL ,
2017-05-24 20:48:44 +00:00
fieldcomputed text ,
2022-09-29 14:24:07 +00:00
fielddefault text ,
2012-09-22 18:27:06 +00:00
fieldunique integer DEFAULT 0 ,
2012-10-25 11:11:55 +00:00
fieldrequired integer DEFAULT 0 ,
2015-08-12 22:51:32 +00:00
perms varchar ( 255 ) , -- not used yet
2018-01-13 12:16:33 +00:00
enabled varchar ( 255 ) ,
2024-10-17 16:30:41 +00:00
module varchar ( 64 ) ,
2013-03-28 21:13:04 +00:00
pos integer DEFAULT 0 ,
2015-08-12 22:51:32 +00:00
alwayseditable integer DEFAULT 0 , -- 1 if field can be edited whatever is element status
2025-08-04 14:48:11 +00:00
emptyonclone integer DEFAULT 0 , -- 1 if field can be edited whatever is element status
2015-08-12 22:51:32 +00:00
param text , -- extra parameters to define possible values of field
2018-04-10 13:39:11 +00:00
list varchar ( 255 ) DEFAULT ' 1 ' , -- visibility of field. 0=Never visible, 1=Visible on list and forms, 2=Visible on list only. Using a negative value means field is not shown by default on list but can be selected for viewing
2020-02-23 22:03:17 +00:00
printable integer DEFAULT 0 , -- is the extrafield output on documents
2026-03-13 07:25:40 +00:00
showintooltip integer DEFAULT 0 , -- is the extrafield output on tooltip
2018-07-26 07:41:44 +00:00
totalizable boolean DEFAULT FALSE , -- is extrafield totalizable on list
2017-08-27 10:06:46 +00:00
langs varchar ( 64 ) , -- example: fileofmymodule@mymodule
2018-06-28 17:13:23 +00:00
help text , -- to store help tooltip
2025-04-06 18:59:14 +00:00
aiprompt text , -- a prompt to autofill the value with AI
2022-05-22 23:02:59 +00:00
css varchar ( 128 ) , -- to store css on create/update forms
cssview varchar ( 128 ) , -- to store css on view form
csslist varchar ( 128 ) , -- to store css on list
2026-05-07 11:01:22 +00:00
personal_data tinyint DEFAULT 0 , -- 1 if field contains personal data (GDPR/nLPD/LGPD)
2017-07-25 09:57:36 +00:00
fk_user_author integer , -- user making creation
fk_user_modif integer , -- user making last change
datec datetime , -- date de creation
2020-10-08 10:29:01 +00:00
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP -- last modification date
2011-02-24 09:57:02 +00:00
) ENGINE = innodb ;