diff --git a/htdocs/modulebuilder/template/sql/llx_mymodule_myobject.sql b/htdocs/modulebuilder/template/sql/llx_mymodule_myobject.sql index 84275e204c1..a49db74f570 100644 --- a/htdocs/modulebuilder/template/sql/llx_mymodule_myobject.sql +++ b/htdocs/modulebuilder/template/sql/llx_mymodule_myobject.sql @@ -21,7 +21,7 @@ CREATE TABLE llx_mymodule_myobject( label VARCHAR(255), qty INTEGER, date_creation DATETIME NOT NULL, - tms TIMESTAMP, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_create INTEGER, fk_user_modif INTEGER, status INTEGER, diff --git a/htdocs/modulebuilder/template/sql/llx_mymodule_myobject_extrafields.sql b/htdocs/modulebuilder/template/sql/llx_mymodule_myobject_extrafields.sql index 53eab2a7179..497a9ff06f9 100644 --- a/htdocs/modulebuilder/template/sql/llx_mymodule_myobject_extrafields.sql +++ b/htdocs/modulebuilder/template/sql/llx_mymodule_myobject_extrafields.sql @@ -16,7 +16,7 @@ create table llx_mymodule_myobject_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb;