diff --git a/htdocs/core/lib/modulebuilder.lib.php b/htdocs/core/lib/modulebuilder.lib.php index d44da05fa38..7c32b377bd4 100644 --- a/htdocs/core/lib/modulebuilder.lib.php +++ b/htdocs/core/lib/modulebuilder.lib.php @@ -305,6 +305,8 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = ' $texttoinsert .= "\t".$key." ".$type; if ($key == 'rowid') { $texttoinsert .= ' AUTO_INCREMENT PRIMARY KEY'; + } elseif ($type == 'timestamp') { + $texttoinsert .= ' DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'; } if ($key == 'entity') { $texttoinsert .= ' DEFAULT 1'; diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql index ac032d3541d..ab7ea0219ec 100644 --- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql +++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql @@ -183,7 +183,7 @@ CREATE TABLE llx_workstation_workstation( entity int DEFAULT 1, note_private text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), @@ -201,14 +201,14 @@ ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_st CREATE TABLE llx_workstation_workstation_resource( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_resource integer, fk_workstation integer ) ENGINE=innodb; CREATE TABLE llx_workstation_workstation_usergroup( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_usergroup integer, fk_workstation integer ) ENGINE=innodb; @@ -264,7 +264,7 @@ create table llx_payment_vat rowid integer AUTO_INCREMENT PRIMARY KEY, fk_tva integer, datec datetime, -- date de creation - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount double(24,8) DEFAULT 0, fk_typepaiement integer NOT NULL, @@ -431,7 +431,7 @@ CREATE TABLE llx_eventorganization_conferenceorboothattendee( note_public text, note_private text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, last_main_doc varchar(255), @@ -466,7 +466,7 @@ ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD UNIQUE INDEX uk_ create table llx_eventorganization_conferenceorboothattendee_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; @@ -510,7 +510,7 @@ CREATE TABLE llx_partnership( reason_decline_or_cancel text NULL, date_creation datetime NOT NULL, fk_user_creat integer NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_modif integer, note_private text, note_public text, @@ -533,7 +533,7 @@ ALTER TABLE llx_partnership ADD INDEX idx_partnership_fk_member (fk_member); create table llx_partnership_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; @@ -568,7 +568,7 @@ CREATE TABLE llx_knowledgemanagement_knowledgerecord( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, ref varchar(128) NOT NULL, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, last_main_doc varchar(255), fk_user_creat integer NOT NULL, fk_user_modif integer, @@ -592,7 +592,7 @@ ALTER TABLE llx_knowledgemanagement_knowledgerecord ADD COLUMN url varchar(255); create table llx_knowledgemanagement_knowledgerecord_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; diff --git a/htdocs/install/mysql/migration/14.0.0-15.0.0.sql b/htdocs/install/mysql/migration/14.0.0-15.0.0.sql index d33701c6ad6..c062b57c482 100644 --- a/htdocs/install/mysql/migration/14.0.0-15.0.0.sql +++ b/htdocs/install/mysql/migration/14.0.0-15.0.0.sql @@ -193,7 +193,7 @@ CREATE TABLE llx_hrm_evaluation note_public text, note_private text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), @@ -211,7 +211,7 @@ ALTER TABLE llx_hrm_evaluation ADD INDEX idx_hrm_evaluation_status (status); create table llx_hrm_evaluation_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; @@ -224,7 +224,7 @@ CREATE TABLE llx_hrm_evaluationdet -- BEGIN MODULEBUILDER FIELDS rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, fk_skill integer NOT NULL, @@ -243,7 +243,7 @@ ALTER TABLE llx_hrm_evaluationdet ADD INDEX idx_hrm_evaluationdet_fk_evaluation create table llx_hrm_evaluationdet_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; @@ -258,7 +258,7 @@ CREATE TABLE llx_hrm_job label varchar(255) NOT NULL, description text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, deplacement varchar(255), note_public text, note_private text, @@ -273,7 +273,7 @@ ALTER TABLE llx_hrm_job ADD INDEX idx_hrm_job_label (label); create table llx_hrm_job_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; @@ -287,7 +287,7 @@ CREATE TABLE llx_hrm_job_user( -- ref varchar(128) NOT NULL, description text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_contrat integer, fk_user integer NOT NULL, fk_job integer NOT NULL, @@ -313,7 +313,7 @@ CREATE TABLE llx_hrm_skill label varchar(255), description text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, required_level integer NOT NULL, @@ -331,7 +331,7 @@ ALTER TABLE llx_hrm_skill ADD INDEX idx_hrm_skill_skill_type (skill_type); create table llx_hrm_skill_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; diff --git a/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.sql b/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.sql index b505f8f6a31..d6139f48f21 100644 --- a/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.sql +++ b/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.sql @@ -28,7 +28,7 @@ CREATE TABLE llx_eventorganization_conferenceorboothattendee( note_public text, note_private text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, last_main_doc varchar(255), diff --git a/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee_extrafields.sql b/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee_extrafields.sql index 5455314ff06..98a2bc5385f 100644 --- a/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee_extrafields.sql @@ -16,7 +16,7 @@ create table llx_eventorganization_conferenceorboothattendee_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; diff --git a/htdocs/install/mysql/tables/llx_hrm_evaluation-hrm.sql b/htdocs/install/mysql/tables/llx_hrm_evaluation-hrm.sql index bc9b7a1effc..7327d1403dc 100644 --- a/htdocs/install/mysql/tables/llx_hrm_evaluation-hrm.sql +++ b/htdocs/install/mysql/tables/llx_hrm_evaluation-hrm.sql @@ -25,7 +25,7 @@ CREATE TABLE llx_hrm_evaluation( note_public text, note_private text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), diff --git a/htdocs/install/mysql/tables/llx_hrm_evaluation_extrafields-hrm.sql b/htdocs/install/mysql/tables/llx_hrm_evaluation_extrafields-hrm.sql index da00cc3c333..fe600797141 100644 --- a/htdocs/install/mysql/tables/llx_hrm_evaluation_extrafields-hrm.sql +++ b/htdocs/install/mysql/tables/llx_hrm_evaluation_extrafields-hrm.sql @@ -18,7 +18,7 @@ create table llx_hrm_evaluation_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; diff --git a/htdocs/install/mysql/tables/llx_hrm_evaluationdet-hrm.sql b/htdocs/install/mysql/tables/llx_hrm_evaluationdet-hrm.sql index 4e1b3860ec8..4faa0a4bb91 100644 --- a/htdocs/install/mysql/tables/llx_hrm_evaluationdet-hrm.sql +++ b/htdocs/install/mysql/tables/llx_hrm_evaluationdet-hrm.sql @@ -20,7 +20,7 @@ CREATE TABLE llx_hrm_evaluationdet ( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, fk_skill integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_hrm_evaluationdet_extrafields-hrm.sql b/htdocs/install/mysql/tables/llx_hrm_evaluationdet_extrafields-hrm.sql index 4d4031ba228..44151cf78d0 100644 --- a/htdocs/install/mysql/tables/llx_hrm_evaluationdet_extrafields-hrm.sql +++ b/htdocs/install/mysql/tables/llx_hrm_evaluationdet_extrafields-hrm.sql @@ -18,7 +18,7 @@ create table llx_hrm_evaluationdet_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; diff --git a/htdocs/install/mysql/tables/llx_hrm_job-hrm.sql b/htdocs/install/mysql/tables/llx_hrm_job-hrm.sql index 51f472af377..106d847b136 100644 --- a/htdocs/install/mysql/tables/llx_hrm_job-hrm.sql +++ b/htdocs/install/mysql/tables/llx_hrm_job-hrm.sql @@ -22,7 +22,7 @@ CREATE TABLE llx_hrm_job( label varchar(255) NOT NULL, description text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, deplacement varchar(255), note_public text, note_private text, diff --git a/htdocs/install/mysql/tables/llx_hrm_job_extrafields-hrm.sql b/htdocs/install/mysql/tables/llx_hrm_job_extrafields-hrm.sql index 10cccf1c36f..f580abea39e 100644 --- a/htdocs/install/mysql/tables/llx_hrm_job_extrafields-hrm.sql +++ b/htdocs/install/mysql/tables/llx_hrm_job_extrafields-hrm.sql @@ -18,7 +18,7 @@ create table llx_hrm_job_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; diff --git a/htdocs/install/mysql/tables/llx_hrm_job_user-hrm.sql b/htdocs/install/mysql/tables/llx_hrm_job_user-hrm.sql index 6124f84e1e6..33906d1607f 100644 --- a/htdocs/install/mysql/tables/llx_hrm_job_user-hrm.sql +++ b/htdocs/install/mysql/tables/llx_hrm_job_user-hrm.sql @@ -21,7 +21,7 @@ CREATE TABLE llx_hrm_job_user( -- ref varchar(128) NOT NULL, description text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_contrat integer, fk_user integer NOT NULL, fk_job integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_hrm_skill-hrm.sql b/htdocs/install/mysql/tables/llx_hrm_skill-hrm.sql index 96a31be588a..441fdcf8505 100644 --- a/htdocs/install/mysql/tables/llx_hrm_skill-hrm.sql +++ b/htdocs/install/mysql/tables/llx_hrm_skill-hrm.sql @@ -22,7 +22,7 @@ CREATE TABLE llx_hrm_skill( label varchar(255), description text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, required_level integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_hrm_skill_extrafields-hrm.sql b/htdocs/install/mysql/tables/llx_hrm_skill_extrafields-hrm.sql index d47657e34f8..15bf4da0464 100644 --- a/htdocs/install/mysql/tables/llx_hrm_skill_extrafields-hrm.sql +++ b/htdocs/install/mysql/tables/llx_hrm_skill_extrafields-hrm.sql @@ -18,7 +18,7 @@ create table llx_hrm_skill_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; diff --git a/htdocs/install/mysql/tables/llx_intracommreport.sql b/htdocs/install/mysql/tables/llx_intracommreport.sql index d3d2956e4ab..c12f9eb0862 100644 --- a/htdocs/install/mysql/tables/llx_intracommreport.sql +++ b/htdocs/install/mysql/tables/llx_intracommreport.sql @@ -28,5 +28,5 @@ create table llx_intracommreport content_xml text, type_export varchar(10), datec datetime, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_knowledgemanagement_knowledgerecord.sql b/htdocs/install/mysql/tables/llx_knowledgemanagement_knowledgerecord.sql index 384725056ab..a12c73b9cde 100644 --- a/htdocs/install/mysql/tables/llx_knowledgemanagement_knowledgerecord.sql +++ b/htdocs/install/mysql/tables/llx_knowledgemanagement_knowledgerecord.sql @@ -20,7 +20,7 @@ CREATE TABLE llx_knowledgemanagement_knowledgerecord( entity integer DEFAULT 1 NOT NULL, -- multi company id ref varchar(128) NOT NULL, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, last_main_doc varchar(255), lang varchar(6), fk_user_creat integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_knowledgemanagement_knowledgerecord_extrafields.sql b/htdocs/install/mysql/tables/llx_knowledgemanagement_knowledgerecord_extrafields.sql index 6498324ed8c..5f7e09f5901 100644 --- a/htdocs/install/mysql/tables/llx_knowledgemanagement_knowledgerecord_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_knowledgemanagement_knowledgerecord_extrafields.sql @@ -16,7 +16,7 @@ create table llx_knowledgemanagement_knowledgerecord_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; diff --git a/htdocs/install/mysql/tables/llx_partnership.sql b/htdocs/install/mysql/tables/llx_partnership.sql index 47ee7f3a48b..e3a5cb37e05 100644 --- a/htdocs/install/mysql/tables/llx_partnership.sql +++ b/htdocs/install/mysql/tables/llx_partnership.sql @@ -29,7 +29,7 @@ CREATE TABLE llx_partnership( reason_decline_or_cancel text NULL, date_creation datetime NOT NULL, fk_user_creat integer NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_modif integer, note_private text, note_public text, diff --git a/htdocs/install/mysql/tables/llx_payment_vat.sql b/htdocs/install/mysql/tables/llx_payment_vat.sql index 4ebb5bb4af3..6975a5d3a35 100644 --- a/htdocs/install/mysql/tables/llx_payment_vat.sql +++ b/htdocs/install/mysql/tables/llx_payment_vat.sql @@ -22,7 +22,7 @@ create table llx_payment_vat rowid integer AUTO_INCREMENT PRIMARY KEY, fk_tva integer, datec datetime, -- date de creation - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount double(24,8) DEFAULT 0, fk_typepaiement integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_workstation_workstation.sql b/htdocs/install/mysql/tables/llx_workstation_workstation.sql index a4d9fd4dbc8..5a8c1d90c7e 100755 --- a/htdocs/install/mysql/tables/llx_workstation_workstation.sql +++ b/htdocs/install/mysql/tables/llx_workstation_workstation.sql @@ -24,7 +24,7 @@ CREATE TABLE llx_workstation_workstation( entity int DEFAULT 1, note_private text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), diff --git a/htdocs/install/mysql/tables/llx_workstation_workstation_resource.sql b/htdocs/install/mysql/tables/llx_workstation_workstation_resource.sql index 92463ade696..06cb9d74635 100755 --- a/htdocs/install/mysql/tables/llx_workstation_workstation_resource.sql +++ b/htdocs/install/mysql/tables/llx_workstation_workstation_resource.sql @@ -16,7 +16,7 @@ CREATE TABLE llx_workstation_workstation_resource( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_resource integer, fk_workstation integer ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_workstation_workstation_usergroup.sql b/htdocs/install/mysql/tables/llx_workstation_workstation_usergroup.sql index 9ecccc88d82..7fa3bb5abf8 100755 --- a/htdocs/install/mysql/tables/llx_workstation_workstation_usergroup.sql +++ b/htdocs/install/mysql/tables/llx_workstation_workstation_usergroup.sql @@ -16,7 +16,7 @@ CREATE TABLE llx_workstation_workstation_usergroup( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_usergroup integer, fk_workstation integer ) ENGINE=innodb; diff --git a/test/phpunit/CodingSqlTest.php b/test/phpunit/CodingSqlTest.php index f79205a0443..96ae1f61ab0 100644 --- a/test/phpunit/CodingSqlTest.php +++ b/test/phpunit/CodingSqlTest.php @@ -218,6 +218,10 @@ class CodingSqlTest extends PHPUnit\Framework\TestCase //print __METHOD__." Result for checking we don't have 'integer(' = ".$result."\n"; $this->assertTrue($result===false, 'Found value in parenthesis after the integer. It must be integer not integer(x) into '.$file.'. Bad.'); + $result=strpos($filecontent, 'timestamp,'); + //print __METHOD__." Result for checking we don't have 'NUMERIC(' = ".$result."\n"; + $this->assertTrue($result===false, 'Found type timestamp with option DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP after into '.$file.'. Bad.'); + if ($dir == DOL_DOCUMENT_ROOT.'/install/mysql/migration') { // Test for migration files only } elseif ($dir == DOL_DOCUMENT_ROOT.'/install/mysql/data') {