FIX add default value of timestamp for avoid error

This commit is contained in:
Regis Houssin 2020-10-08 12:29:01 +02:00
parent b8681c0b41
commit 111f73bd86
196 changed files with 326 additions and 326 deletions

View File

@ -357,8 +357,8 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$line = str_replace(" time with time zone", " time", $line);
$line = str_replace(" time without time zone", " time", $line);
$line = str_replace(" timestamp DEFAULT now()", " timestamp DEFAULT CURRENT_TIMESTAMP", $line);
$line = str_replace(" timestamp without time zone DEFAULT now()", " timestamp DEFAULT CURRENT_TIMESTAMP", $line);
$line = str_replace(" timestamp DEFAULT now()", " timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP", $line);
$line = str_replace(" timestamp without time zone DEFAULT now()", " timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP", $line);
if (strstr($line, "auto_increment") || preg_match('/ rowid int/', $line) || preg_match('/ id int/', $line)) {
$field = getfieldname($line);

View File

@ -119,7 +119,7 @@ ALTER TABLE llx_categorie_warehouse ADD CONSTRAINT fk_categorie_warehouse_fk_war
create table llx_holiday_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;
@ -135,7 +135,7 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
create table llx_entrepot_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;
@ -165,7 +165,7 @@ ALTER TABLE llx_events ADD COLUMN prefix_session varchar(255) NULL;
create table llx_payment_salary_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- salary payment id
import_key varchar(14) -- import key
)ENGINE=innodb;
@ -183,8 +183,8 @@ ALTER TABLE llx_oauth_token ADD COLUMN fk_soc integer DEFAULT NULL after token;
ALTER TABLE llx_adherent_type ADD COLUMN duration varchar(6) DEFAULT NULL after morphy;
ALTER TABLE llx_mailing ADD COLUMN tms timestamp;
ALTER TABLE llx_mailing_cibles ADD COLUMN tms timestamp;
ALTER TABLE llx_mailing ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_mailing_cibles ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_projet ADD COLUMN usage_opportunity integer DEFAULT 0;
ALTER TABLE llx_projet ADD COLUMN usage_task integer DEFAULT 1;
@ -458,7 +458,7 @@ create table llx_c_shipment_package_type
CREATE TABLE llx_product_fournisseur_price_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;
@ -478,7 +478,7 @@ CREATE TABLE llx_mrp_mo(
note_private text,
date_creation datetime NOT NULL,
date_valid datetime NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat integer NOT NULL,
fk_user_modif integer,
fk_user_valid integer,
@ -514,7 +514,7 @@ ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_fk_project (fk_project);
create table llx_mrp_mo_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;
@ -551,7 +551,7 @@ CREATE TABLE llx_mrp_production(
fk_mrp_production integer, -- if role = 'consumed', id of line with role 'toconsume', if role = 'produced' id of line with role 'toproduce'
fk_stock_movement integer, -- id of stock movement when movements are validated
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)
@ -576,7 +576,7 @@ ALTER TABLE llx_facture_rec MODIFY COLUMN fk_cond_reglement integer NOT NULL DEF
create table llx_commande_fournisseur_dispatch_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- object id
import_key varchar(14) -- import key
)ENGINE=innodb;
@ -587,7 +587,7 @@ ALTER TABLE llx_commande_fournisseur_dispatch_extrafields ADD INDEX idx_commande
create table llx_facturedet_rec_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- object id
import_key varchar(14) -- import key
)ENGINE=innodb;

View File

@ -36,7 +36,7 @@ UPDATE llx_c_units set scale = 86400 where code = 'D' and unit_type = 'time';
create table llx_commande_fournisseur_dispatch_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- object id
import_key varchar(14) -- import key
)ENGINE=innodb;
@ -57,7 +57,7 @@ create table llx_c_shipment_package_type
create table llx_facturedet_rec_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- object id
import_key varchar(14) -- import key
)ENGINE=innodb;
@ -69,7 +69,7 @@ ALTER TABLE llx_facture_rec MODIFY COLUMN titre varchar(200) NOT NULL;
create table llx_mrp_mo_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;
@ -303,7 +303,7 @@ ALTER TABLE llx_categorie_website_page ADD CONSTRAINT fk_categorie_website_page_
ALTER TABLE llx_categorie_website_page ADD CONSTRAINT fk_categorie_website_page_website_page_rowid FOREIGN KEY (fk_website_page) REFERENCES llx_website_page (rowid);
ALTER TABLE llx_categorie ADD COLUMN date_creation datetime;
ALTER TABLE llx_categorie ADD COLUMN tms timestamp;
ALTER TABLE llx_categorie ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_categorie ADD COLUMN fk_user_creat integer;
ALTER TABLE llx_categorie ADD COLUMN fk_user_modif integer;

View File

@ -47,7 +47,7 @@ ALTER TABLE llx_bom_bom_extrafields ADD INDEX idx_bom_bom_extrafields_fk_object
create table llx_mrp_mo_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;
@ -124,7 +124,7 @@ CREATE TABLE llx_recruitment_recruitmentjobposition(
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,
last_main_doc varchar(255),
@ -150,7 +150,7 @@ ALTER TABLE llx_recruitment_recruitmentjobposition ADD COLUMN remuneration_sugge
create table llx_recruitment_recruitmentjobposition_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;
@ -169,7 +169,7 @@ CREATE TABLE llx_recruitment_recruitmentcandidature(
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),
@ -200,7 +200,7 @@ ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_rec
create table llx_recruitment_recruitmentcandidature_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;
@ -290,8 +290,8 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_SENTBYMAIL','Mails sent from third party card','Executed when you send email from contact adress card','contact',51);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_DELETE','Contact address deleted','Executed when a contact is deleted','contact',52);
ALTER TABLE llx_ecm_directories CHANGE COLUMN date_m tms timestamp;
ALTER TABLE llx_ecm_files CHANGE COLUMN date_m tms timestamp;
ALTER TABLE llx_ecm_directories CHANGE COLUMN date_m tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_ecm_files CHANGE COLUMN date_m tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,<br><br>\n\n__(YourCandidatureAnswer)__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
@ -337,7 +337,7 @@ ALTER TABLE llx_menu MODIFY COLUMN enabled text;
CREATE TABLE llx_ecm_files_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;
@ -347,7 +347,7 @@ ALTER TABLE llx_ecm_files_extrafields ADD INDEX idx_ecm_files_extrafields (fk_ob
CREATE TABLE llx_ecm_directories_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;

View File

@ -419,19 +419,19 @@ update llx_actioncomm set elementtype='order' where elementtype='commande';
update llx_actioncomm set elementtype='contract' where elementtype='contrat';
alter table llx_propal add column tms timestamp after fk_projet;
alter table llx_propal add column tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP after fk_projet;
create table llx_product_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL
) ENGINE=innodb;
create table llx_societe_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL
) ENGINE=innodb;
@ -487,7 +487,7 @@ ALTER TABLE llx_don ADD phone varchar(24) after email;
ALTER TABLE llx_element_element MODIFY sourcetype varchar(32) NOT NULL;
ALTER TABLE llx_element_element MODIFY targettype varchar(32) NOT NULL;
ALTER TABLE llx_societe_prices MODIFY tms timestamp NULL;
ALTER TABLE llx_societe_prices MODIFY tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
-- ALTER TABLE llx_societe_prices ALTER COLUMN tms DROP NOT NULL;
-- Fix: It seems this is missing for some users

View File

@ -62,7 +62,7 @@ ALTER TABLE llx_societe MODIFY code_compta varchar(24);
ALTER TABLE llx_societe MODIFY code_compta_fournisseur varchar(24);
ALTER TABLE llx_chargesociales ADD COLUMN tms timestamp;
ALTER TABLE llx_chargesociales ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_chargesociales ADD COLUMN date_creation datetime;
ALTER TABLE llx_chargesociales ADD COLUMN date_valid datetime;
@ -118,7 +118,7 @@ CREATE TABLE llx_localtax
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer NOT NULL DEFAULT '1',
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datep date DEFAULT NULL,
datev date DEFAULT NULL,
amount double NOT NULL DEFAULT '0',

View File

@ -39,7 +39,7 @@ ALTER TABLE llx_societe DROP COLUMN description;
ALTER TABLE llx_societe DROP COLUMN services;
ALTER TABLE llx_societe MODIFY COLUMN ref_ext varchar(128);
ALTER TABLE llx_bank ADD COLUMN tms timestamp after datec;
ALTER TABLE llx_bank ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP after datec;
-- Monaco VAT Rates
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 271, 27,'19.6','0','VAT standard rate (France hors DOM-TOM)',1);
@ -267,7 +267,7 @@ ALTER TABLE llx_extrafields ADD COLUMN fieldrequired INTEGER DEFAULT 0;
create table llx_socpeople_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;
@ -276,7 +276,7 @@ ALTER TABLE llx_socpeople_extrafields ADD INDEX idx_socpeople_extrafields (fk_ob
create table llx_actioncomm_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;
@ -835,7 +835,7 @@ CREATE TABLE llx_product_price_by_qty
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_product_price integer NOT NULL,
date_price timestamp,
date_price timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
price double (24,8) DEFAULT 0,
price_ttc double (24,8) DEFAULT 0,
qty_min real DEFAULT 0
@ -910,7 +910,7 @@ ALTER TABLE llx_bank_account MODIFY COLUMN code_banque varchar(8);
create table llx_user_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- member id
import_key varchar(14) -- import key
)ENGINE=innodb;

View File

@ -23,7 +23,7 @@ ALTER TABLE llx_menu MODIFY COLUMN leftmenu varchar(100);
create table llx_adherent_type_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;
@ -115,7 +115,7 @@ ALTER TABLE llx_c_shipment_mode ADD COLUMN tracking VARCHAR(255) NOT NULL DEFAUL
-- VMYSQL4.3 ALTER TABLE llx_c_shipment_mode CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
-- VPGSQL8.2 DROP table llx_c_shipment_mode;
-- VPGSQL8.2 CREATE TABLE llx_c_shipment_mode (rowid SERIAL PRIMARY KEY, tms timestamp, code varchar(30) NOT NULL, libelle varchar(50) NOT NULL, description text, tracking varchar(255) NOT NULL, active integer DEFAULT 0, module varchar(32) NULL);
-- VPGSQL8.2 CREATE TABLE llx_c_shipment_mode (rowid SERIAL PRIMARY KEY, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, code varchar(30) NOT NULL, libelle varchar(50) NOT NULL, description text, tracking varchar(255) NOT NULL, active integer DEFAULT 0, module varchar(32) NULL);
-- VPGSQL8.2 INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (1,'CATCH','Catch','Catch by client','',1);
-- VPGSQL8.2 INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (2,'TRANS','Transporter','Generic transporter','',1);
-- VPGSQL8.2 INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (3,'COLSUI','Colissimo Suivi','Colissimo Suivi','',0);
@ -136,7 +136,7 @@ ALTER TABLE llx_stock_mouvement MODIFY COLUMN value real;
create table llx_propal_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;
@ -145,7 +145,7 @@ ALTER TABLE llx_propal_extrafields ADD INDEX idx_propal_extrafields (fk_object);
create table llx_facture_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;
@ -205,7 +205,7 @@ ALTER TABLE llx_facturedet DROP COLUMN fk_export_compta;
CREATE TABLE llx_cronjob
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datec datetime,
jobtype varchar(10) NOT NULL,
label text NOT NULL,
@ -249,7 +249,7 @@ DROP TABLE llx_printer_ipp;
CREATE TABLE llx_printer_ipp
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datec datetime,
printer_name text NOT NULL,
printer_location text NOT NULL,
@ -265,7 +265,7 @@ ALTER TABLE llx_adherent MODIFY COLUMN ref_ext varchar(128);
create table llx_commande_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)
) ENGINE=innodb;
@ -299,7 +299,7 @@ ALTER TABLE llx_socpeople CHANGE COLUMN note note_private text;
create table llx_projet_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;
@ -308,7 +308,7 @@ ALTER TABLE llx_projet_extrafields ADD INDEX idx_projet_extrafields (fk_object);
create table llx_projet_task_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;
@ -319,7 +319,7 @@ CREATE TABLE llx_opensurvey_comments (
id_comment INTEGER unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
id_sondage CHAR(16) NOT NULL,
comment text NOT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
usercomment text
) ENGINE=InnoDB;
@ -336,7 +336,7 @@ CREATE TABLE llx_opensurvey_sondage (
survey_link_visible integer DEFAULT 1,
canedit integer DEFAULT 0,
origin varchar(64),
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
sujet TEXT
) ENGINE=InnoDB;
CREATE TABLE llx_opensurvey_user_studs (
@ -344,7 +344,7 @@ CREATE TABLE llx_opensurvey_user_studs (
nom VARCHAR(64) NOT NULL,
id_sondage VARCHAR(16) NOT NULL,
reponses VARCHAR(100) NOT NULL,
tms timestamp
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB;
ALTER TABLE llx_opensurvey_sondage ADD COLUMN id_sondage_admin CHAR(24);
@ -367,7 +367,7 @@ UPDATE llx_extrafields SET elementtype='societe' WHERE elementtype='company';
create table llx_commande_fournisseur_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)
) ENGINE=innodb;
@ -376,7 +376,7 @@ ALTER TABLE llx_commande_fournisseur_extrafields ADD INDEX idx_commande_fourniss
create table llx_facture_fourn_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;

View File

@ -43,7 +43,7 @@ ALTER TABLE llx_socpeople ADD COLUMN statut tinyint DEFAULT 1 NOT NULL AFTER imp
create table llx_fichinter_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;
@ -55,7 +55,7 @@ ALTER TABLE llx_product ADD COLUMN desiredstock integer DEFAULT 0;
create table llx_commandedet_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)
)ENGINE=innodb;
@ -69,7 +69,7 @@ ALTER TABLE llx_facturedet_rec ADD COLUMN info_bits integer DEFAULT 0 after tota
create table llx_facturedet_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- object id
import_key varchar(14) -- import key
)ENGINE=innodb;
@ -79,7 +79,7 @@ ALTER TABLE llx_facturedet_extrafields ADD INDEX idx_facturedet_extrafields (fk_
create table llx_propaldet_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- object id
import_key varchar(14) -- import key
)ENGINE=innodb;
@ -314,7 +314,7 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc
-- Add ref_ext on bordereau_cheque
ALTER TABLE llx_bordereau_cheque ADD ref_ext VARCHAR(255);
ALTER TABLE llx_bordereau_cheque ADD tms timestamp;
ALTER TABLE llx_bordereau_cheque ADD tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
-- Task 1011
@ -337,7 +337,7 @@ ALTER TABLE llx_contratdet ADD column product_type integer DEFAULT 1 after total
create table llx_contrat_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;

View File

@ -74,7 +74,7 @@ ALTER TABLE llx_bookmark MODIFY COLUMN url varchar(255) NOT NULL;
-- VMYSQL4.3 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN date_fin DATETIME NULL DEFAULT NULL;
-- VPGSQL8.2 ALTER TABLE llx_opensurvey_sondage ALTER COLUMN date_fin DROP NOT NULL;
-- VMYSQL4.1 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP;
-- VMYSQL4.1 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_opensurvey_sondage ADD COLUMN entity integer DEFAULT 1 NOT NULL;
@ -108,7 +108,7 @@ create table llx_product_customer_price
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1 NOT NULL, -- multi company id
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_product integer NOT NULL,
fk_soc integer NOT NULL,
price double(24,8) DEFAULT 0,
@ -164,7 +164,7 @@ ALTER TABLE llx_product ADD COLUMN tobatch tinyint DEFAULT 0 NOT NULL;
CREATE TABLE llx_product_batch (
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_product_stock integer NOT NULL,
eatby datetime DEFAULT NULL,
sellby datetime DEFAULT NULL,
@ -187,7 +187,7 @@ CREATE TABLE llx_expeditiondet_batch (
--DROP TABLE llx_payment_salary
CREATE TABLE llx_payment_salary (
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user integer NOT NULL,
datep date,
datev date,
@ -229,7 +229,7 @@ ALTER TABLE llx_projet_task_time ADD thm double(24,8) AFTER fk_user;
create table llx_categories_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;
@ -283,7 +283,7 @@ CREATE TABLE llx_resource
fk_code_type_resource varchar(32),
note_public text,
note_private text,
tms timestamp
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)ENGINE=innodb;
ALTER TABLE llx_resource ADD INDEX fk_code_type_resource_idx (fk_code_type_resource);
@ -298,7 +298,7 @@ CREATE TABLE llx_element_resources
busy integer,
mandatory integer,
fk_user_create integer,
tms timestamp
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)ENGINE=innodb;
ALTER TABLE llx_element_resources ADD UNIQUE INDEX idx_element_resources_idx1 (resource_id, resource_type, element_id, element_type);

View File

@ -137,7 +137,7 @@ DROP TABLE llx_compta_compte_generaux;
-- Align size for accounting account
ALTER TABLE llx_accountingaccount MODIFY COLUMN account_number varchar(32);
ALTER TABLE llx_accountingaccount MODIFY COLUMN account_parent varchar(32);
ALTER TABLE llx_accountingaccount add column tms timestamp AFTER datec;
ALTER TABLE llx_accountingaccount add column tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER datec;
ALTER TABLE llx_accountingdebcred MODIFY COLUMN account_number varchar(32);
ALTER TABLE llx_bank_account MODIFY COLUMN account_number varchar(32);
ALTER TABLE llx_c_chargesociales MODIFY COLUMN accountancy_code varchar(32);
@ -233,7 +233,7 @@ create table llx_accounting_fiscalyear
statut tinyint DEFAULT 0 NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
datec datetime NOT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_author integer NULL,
fk_user_modif integer NULL
)ENGINE=innodb;
@ -1050,7 +1050,7 @@ create table llx_c_email_templates
private smallint DEFAULT 0 NOT NULL, -- Template public or private
fk_user integer, -- Id utilisateur si modele prive, sinon null
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
label varchar(255), -- Label of predefined email
position smallint, -- Position
active tinyint DEFAULT 1 NOT NULL,
@ -1112,7 +1112,7 @@ ALTER TABLE llx_projet_task MODIFY COLUMN planned_workload real DEFAULT 0 NULL;
CREATE TABLE llx_fichinterdet_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;
@ -1121,7 +1121,7 @@ ALTER TABLE llx_fichinterdet_extrafields ADD INDEX idx_ficheinterdet_extrafields
CREATE TABLE llx_usergroup_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;

View File

@ -49,7 +49,7 @@ create table llx_loan
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1 NOT NULL,
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
label varchar(80) NOT NULL,
fk_bank integer,
capital real DEFAULT 0 NOT NULL,
@ -75,7 +75,7 @@ create table llx_payment_loan
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_loan integer,
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datep datetime,
amount_capital real DEFAULT 0,
amount_insurance real DEFAULT 0,
@ -145,7 +145,7 @@ ALTER TABLE llx_product ADD COLUMN lifo double(24,8) AFTER fifo;
CREATE TABLE llx_printing
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datec datetime,
printer_name text NOT NULL,
printer_location text NOT NULL,
@ -177,7 +177,7 @@ DELETE from llx_const where name = 'MAIN_USE_JQUERY_MULTISELECT' and value = '1'
create table llx_bank_account_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;
@ -198,7 +198,7 @@ ALTER TABLE llx_bank_account_extrafields ADD INDEX idx_bank_account_extrafields
create table llx_contratdet_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- object id
import_key varchar(14) -- import key
)ENGINE=innodb;
@ -210,7 +210,7 @@ ALTER TABLE llx_product_fournisseur_price ADD COLUMN delivery_time_days integer;
ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN comment varchar(255);
ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN status integer;
ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN tms timestamp;
ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN batch varchar(30) DEFAULT NULL;
ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN eatby date DEFAULT NULL;
ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN sellby date DEFAULT NULL;
@ -240,7 +240,7 @@ CREATE TABLE llx_expensereport (
date_approve datetime,
date_refuse datetime,
date_cancel datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_author integer NOT NULL,
fk_user_modif integer DEFAULT NULL,
fk_user_valid integer DEFAULT NULL,
@ -297,7 +297,7 @@ create table llx_payment_expensereport
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_expensereport integer,
datec datetime, -- date de creation
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datep datetime, -- payment date
amount real DEFAULT 0,
fk_typepayment integer NOT NULL,
@ -316,7 +316,7 @@ ALTER TABLE llx_societe ADD COLUMN name_alias varchar(128) NULL;
create table llx_commande_fournisseurdet_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)
) ENGINE=innodb;
@ -327,7 +327,7 @@ ALTER TABLE llx_commande_fournisseurdet_extrafields ADD INDEX idx_commande_fourn
create table llx_facture_fourn_det_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;
@ -357,7 +357,7 @@ CREATE TABLE llx_askpricesupplier (
ref_int varchar(255) DEFAULT NULL,
fk_soc integer DEFAULT NULL,
fk_projet integer DEFAULT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datec datetime DEFAULT NULL,
date_valid datetime DEFAULT NULL,
date_cloture datetime DEFAULT NULL,
@ -422,14 +422,14 @@ CREATE TABLE llx_askpricesupplierdet (
CREATE TABLE llx_askpricesupplier_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) DEFAULT NULL
) ENGINE=innodb;
CREATE TABLE llx_askpricesupplierdet_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) DEFAULT NULL
) ENGINE=innodb;
@ -491,7 +491,7 @@ ALTER TABLE llx_don CHANGE COLUMN fk_project fk_projet integer NULL;
create table llx_don_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;
@ -503,7 +503,7 @@ create table llx_payment_donation
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_donation integer,
datec datetime, -- date de creation
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datep datetime, -- payment date
amount real DEFAULT 0,
fk_typepayment integer NOT NULL,
@ -585,7 +585,7 @@ CREATE TABLE IF NOT EXISTS llx_propal_merge_pdf_product (
fk_user_author integer DEFAULT NULL,
fk_user_mod integer NOT NULL,
datec datetime NOT NULL,
tms timestamp NOT NULL,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
import_key varchar(14) DEFAULT NULL
) ENGINE=InnoDB;

View File

@ -146,7 +146,7 @@ CREATE TABLE llx_ecm_files
cover text, -- is this file a file to use for a cover
extraparams varchar(255), -- for stock other parameters with json format
date_c datetime,
date_m timestamp,
date_m timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_c integer,
fk_user_m integer,
acl text -- for future permission 'per file'
@ -227,7 +227,7 @@ CREATE TABLE IF NOT EXISTS llx_establishment (
fk_user_author integer NOT NULL,
fk_user_mod integer NOT NULL,
datec datetime NOT NULL,
tms timestamp NOT NULL,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
status smallint DEFAULT 1
) ENGINE=InnoDB;
@ -236,7 +236,7 @@ CREATE TABLE IF NOT EXISTS llx_user_rib (
fk_user integer NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
label varchar(30),
bank varchar(255), -- bank name
code_banque varchar(128), -- bank code
@ -263,7 +263,7 @@ create table llx_stock_lotserial
eatby date DEFAULT NULL, -- Eatby date
sellby date DEFAULT NULL, -- Sellby date
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat integer,
fk_user_modif integer,
import_key integer
@ -282,7 +282,7 @@ create table llx_budget
date_start date,
date_end date,
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat integer,
fk_user_modif integer,
import_key integer
@ -296,7 +296,7 @@ create table llx_budget_lines
fk_project_ids varchar(255) NOT NULL, -- List of project ids related to this budget. If budget is dedicated to projects not yet started, we recommand to create a project 'Projects to come'.
amount double(24,8) NOT NULL,
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat integer,
fk_user_modif integer,
import_key integer
@ -369,7 +369,7 @@ create table llx_categorie_project
create table llx_expedition_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;
@ -379,7 +379,7 @@ ALTER TABLE llx_expedition_extrafields ADD INDEX idx_expedition_extrafields (fk_
create table llx_expeditiondet_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- object id
import_key varchar(14) -- import key
)ENGINE=innodb;
@ -392,7 +392,7 @@ ALTER TABLE llx_expeditiondet_extrafields ADD INDEX idx_expeditiondet_extrafield
create table llx_livraison_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;
@ -402,7 +402,7 @@ ALTER TABLE llx_livraison_extrafields ADD INDEX idx_livraison_extrafields (fk_ob
create table llx_livraisondet_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- object id
import_key varchar(14) -- import key
)ENGINE=innodb;
@ -595,7 +595,7 @@ insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays
ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN doc_ref varchar(300) NOT NULL;
ALTER TABLE llx_holiday ADD COLUMN tms timestamp;
ALTER TABLE llx_holiday ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_holiday ADD COLUMN entity integer DEFAULT 1 NOT NULL;
ALTER TABLE llx_holiday ADD INDEX idx_holiday_entity (entity);

View File

@ -54,7 +54,7 @@ CREATE TABLE llx_product_lot (
eatby date DEFAULT NULL, -- Eatby date
sellby date DEFAULT NULL, -- Sellby date
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat integer,
fk_user_modif integer,
import_key integer
@ -140,7 +140,7 @@ CREATE TABLE llx_website
fk_default_home integer,
date_creation datetime,
date_modification datetime,
tms timestamp
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=innodb;
ALTER TABLE llx_website ADD COLUMN fk_default_home integer;
ALTER TABLE llx_website CHANGE COLUMN shortname ref varchar(24) NOT NULL;
@ -158,7 +158,7 @@ CREATE TABLE llx_website_page
status integer,
date_creation datetime,
date_modification datetime,
tms timestamp
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=innodb;
ALTER TABLE llx_website_page ADD UNIQUE INDEX uk_website_page_url (fk_website,pageurl);
@ -475,7 +475,7 @@ CREATE TABLE llx_advtargetemailing
fk_user_author integer NOT NULL,
datec datetime NOT NULL,
fk_user_mod integer NOT NULL,
tms timestamp NOT NULL
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)ENGINE=InnoDB;
ALTER TABLE llx_advtargetemailing ADD UNIQUE INDEX uk_advtargetemailing_name (name);

View File

@ -114,7 +114,7 @@ ALTER TABLE llx_societe_remise ADD COLUMN entity integer DEFAULT 1 NOT NULL afte
create table llx_expensereport_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;
@ -133,7 +133,7 @@ UPDATE llx_adherent_type SET subscription = '1' WHERE subscription = 'yes';
CREATE TABLE llx_product_lot_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;
@ -145,7 +145,7 @@ ALTER TABLE llx_website_page MODIFY COLUMN content MEDIUMTEXT;
CREATE TABLE llx_product_warehouse_properties
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_product integer NOT NULL,
fk_entrepot integer NOT NULL,
seuil_stock_alerte integer DEFAULT 0,
@ -156,7 +156,7 @@ CREATE TABLE llx_product_warehouse_properties
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN entity integer DEFAULT 1 NOT NULL;
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN fk_user_modif integer;
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN date_creation datetime;
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN tms timestamp;
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
-- VMYSQL4.3 ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN numero_compte varchar(32) NOT NULL;
-- VMYSQL4.3 ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN code_journal varchar(32) NOT NULL;
-- VPGSQL8.2 ALTER TABLE llx_accounting_bookkeeping ALTER COLUMN numero_compte SET NOT NULL;
@ -186,7 +186,7 @@ ALTER TABLE llx_entrepot ADD COLUMN fk_parent integer DEFAULT 0;
create table llx_resource_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;
@ -222,7 +222,7 @@ create table llx_user_employment
ref_ext varchar(50), -- reference into an external system (not used by dolibarr)
fk_user integer,
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat integer,
fk_user_modif integer,
job varchar(128), -- job position. may be a dictionary

View File

@ -61,7 +61,7 @@ ALTER TABLE llx_supplier_proposaldet CHANGE COLUMN fk_askpricesupplier fk_suppli
-- VMYSQL4.3 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN date_fin DATETIME NULL DEFAULT NULL;
-- VPGSQL8.2 ALTER TABLE llx_opensurvey_sondage ALTER COLUMN date_fin DROP NOT NULL;
-- VMYSQL4.1 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP;
-- VMYSQL4.1 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_opensurvey_sondage ADD COLUMN fk_user_creat integer NOT NULL DEFAULT 0;
ALTER TABLE llx_opensurvey_sondage ADD COLUMN status integer DEFAULT 1 after date_fin;
@ -160,7 +160,7 @@ ALTER TABLE llx_projet ADD COLUMN fk_user_modif integer;
ALTER TABLE llx_projet_task ADD COLUMN fk_user_modif integer;
ALTER TABLE llx_projet_task_time ADD COLUMN datec date;
ALTER TABLE llx_projet_task_time ADD COLUMN tms timestamp;
ALTER TABLE llx_projet_task_time ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_product_price ADD COLUMN fk_multicurrency integer;
ALTER TABLE llx_product_price ADD COLUMN multicurrency_code varchar(255);
@ -171,12 +171,12 @@ ALTER TABLE llx_product_price ADD COLUMN multicurrency_price_ttc double(24,8) DE
ALTER TABLE llx_product_price_by_qty ADD COLUMN fk_user_creat integer;
ALTER TABLE llx_product_price_by_qty ADD COLUMN fk_user_modif integer;
ALTER TABLE llx_product_price_by_qty DROP COLUMN date_price;
ALTER TABLE llx_product_price_by_qty ADD COLUMN tms timestamp;
ALTER TABLE llx_product_price_by_qty ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_product_price_by_qty ADD COLUMN import_key varchar(14);
ALTER TABLE llx_user ADD COLUMN import_key varchar(14);
ALTER TABLE llx_facture_rec ADD COLUMN tms timestamp;
ALTER TABLE llx_facture_rec ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
UPDATE llx_facture_rec SET tms = datec where tms < '2000-01-01';
CREATE TABLE llx_product_attribute
@ -295,7 +295,7 @@ CREATE TABLE llx_accounting_bookkeeping_tmp
fk_user_author integer NOT NULL, -- | user creating
fk_user_modif integer, -- | user making last change
date_creation datetime, -- FEC:EcritureDate | creation date
tms timestamp, -- | date last modification
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- | date last modification
import_key varchar(14),
code_journal varchar(32) NOT NULL, -- FEC:JournalCode
journal_label varchar(255), -- FEC:JournalLib
@ -391,7 +391,7 @@ ALTER TABLE llx_contratdet ADD COLUMN vat_src_code varchar(10) DEFAULT '';
CREATE TABLE llx_payment_various
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datec datetime,
datep date,
datev date,
@ -438,7 +438,7 @@ rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 0,
ref varchar(48),
datec datetime DEFAULT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_author integer,
fk_user_modif integer,
fk_user_valid integer,
@ -453,7 +453,7 @@ CREATE TABLE llx_inventorydet
(
rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
datec datetime DEFAULT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_inventory integer DEFAULT 0,
fk_warehouse integer DEFAULT 0,
fk_product integer DEFAULT 0,
@ -467,7 +467,7 @@ new_pmp double DEFAULT 0
)ENGINE=InnoDB;
ALTER TABLE llx_inventory ADD COLUMN datec datetime DEFAULT NULL;
ALTER TABLE llx_inventory ADD COLUMN tms timestamp;
ALTER TABLE llx_inventory ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_inventory ADD INDEX idx_inventory_tms (tms);
ALTER TABLE llx_inventory ADD INDEX idx_inventory_datec (datec);
@ -502,7 +502,7 @@ CREATE TABLE llx_loan_schedule
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_loan integer,
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datep datetime,
amount_capital real DEFAULT 0,
amount_insurance real DEFAULT 0,
@ -547,7 +547,7 @@ CREATE TABLE llx_website_page
fk_user_create integer,
fk_user_modif integer,
date_creation datetime,
tms timestamp
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=innodb;
ALTER TABLE llx_website_page ADD UNIQUE INDEX uk_website_page_url (fk_website,pageurl);
@ -566,7 +566,7 @@ UPDATE llx_extrafields set elementtype='categorie' where elementtype='categories
CREATE TABLE llx_blockedlog
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
action varchar(50),
amounts real NOT NULL,
signature varchar(100) NOT NULL,
@ -593,7 +593,7 @@ CREATE TABLE llx_blockedlog_authority
rowid integer AUTO_INCREMENT PRIMARY KEY,
blockchain longtext NOT NULL,
signature varchar(100) NOT NULL,
tms timestamp
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=innodb;
ALTER TABLE llx_blockedlog_authority ADD INDEX signature (signature);
@ -613,7 +613,7 @@ ALTER TABLE llx_mailing_cibles MODIFY COLUMN source_url varchar(255);
CREATE TABLE llx_facture_rec_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)
) ENGINE=innodb;
@ -623,7 +623,7 @@ ALTER TABLE llx_facture_rec_extrafields ADD INDEX idx_facture_rec_extrafields (f
CREATE TABLE llx_facturedet_rec_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)
)ENGINE=innodb;

View File

@ -265,7 +265,7 @@ ALTER TABLE llx_menu MODIFY fk_leftmenu varchar(100);
CREATE TABLE llx_website_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;
@ -285,7 +285,7 @@ CREATE TABLE llx_website_account(
date_last_login datetime,
date_previous_login datetime,
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),
@ -307,7 +307,7 @@ ALTER TABLE llx_website_account ADD CONSTRAINT llx_website_account_fk_website FO
CREATE TABLE llx_website_account_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;
@ -326,7 +326,7 @@ alter table llx_user add column pass_encoding varchar(24) NULL;
CREATE TABLE IF NOT EXISTS llx_expensereport_ik (
rowid integer AUTO_INCREMENT PRIMARY KEY,
datec datetime DEFAULT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_c_exp_tax_cat integer DEFAULT 0 NOT NULL,
fk_range integer DEFAULT 0 NOT NULL,
coef double DEFAULT 0 NOT NULL,
@ -441,7 +441,7 @@ INSERT INTO llx_c_exp_tax_range (rowid,fk_c_exp_tax_cat,range_ik, entity, active
CREATE TABLE llx_expensereport_rules (
rowid integer AUTO_INCREMENT PRIMARY KEY,
datec datetime DEFAULT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
dates datetime NOT NULL,
datee datetime NOT NULL,
amount numeric(24,8) NOT NULL,
@ -464,7 +464,7 @@ ALTER TABLE llx_extrafields ADD COLUMN fk_user_author integer;
ALTER TABLE llx_extrafields ADD COLUMN fk_user_modif integer;
ALTER TABLE llx_extrafields ADD COLUMN datec datetime;
ALTER TABLE llx_extrafields ADD COLUMN enabled varchar(255) DEFAULT '1';
ALTER TABLE llx_extrafields ADD COLUMN tms timestamp;
ALTER TABLE llx_extrafields ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
-- We fix value of 'list' from 0 to 1 for all extrafields created before this migration
--VMYSQL4.1 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;
@ -528,7 +528,7 @@ DROP TABLE llx_projet_task_comment;
CREATE TABLE llx_comment (
rowid integer AUTO_INCREMENT PRIMARY KEY,
datec datetime DEFAULT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
description text NOT NULL,
fk_user_author integer DEFAULT NULL,
fk_element integer DEFAULT NULL,
@ -572,7 +572,7 @@ create table llx_c_email_senderprofile
entity integer DEFAULT 1 NOT NULL, -- multi company id
private smallint DEFAULT 0 NOT NULL, -- Template public or private
date_creation datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
label varchar(255), -- Label of predefined email
email varchar(255), -- Email
signature text, -- Predefined signature
@ -655,7 +655,7 @@ create table llx_onlinesignature
object_type varchar(32) NOT NULL,
object_id integer NOT NULL,
datec datetime NOT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
name varchar(255) NOT NULL,
ip varchar(128),
pathoffile varchar(255)
@ -709,7 +709,7 @@ ALTER TABLE llx_resource ADD CONSTRAINT fk_resource_fk_country FOREIGN KEY (fk_c
create table llx_facture_rec_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;

View File

@ -149,7 +149,7 @@ CREATE TABLE llx_societe_remise_supplier
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1 NOT NULL, -- multi company id
fk_soc integer NOT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datec datetime, -- creation date
fk_user_author integer, -- creation user
remise_supplier double(6,3) DEFAULT 0 NOT NULL, -- discount
@ -246,7 +246,7 @@ CREATE TABLE llx_ticket
date_read datetime,
date_close datetime,
notify_tiers_at_create tinyint,
tms timestamp
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)ENGINE=innodb;
ALTER TABLE llx_ticket ADD COLUMN notify_tiers_at_create integer;
@ -271,7 +271,7 @@ ALTER TABLE llx_ticket_msg ADD CONSTRAINT fk_ticket_msg_fk_track_id FOREIGN KEY
CREATE TABLE llx_ticket_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)
)ENGINE=innodb;
@ -279,7 +279,7 @@ CREATE TABLE llx_ticket_extrafields
create table llx_facture_rec_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)
) ENGINE=innodb;
@ -371,7 +371,7 @@ CREATE TABLE llx_societe_account(
date_last_login datetime,
date_previous_login datetime,
date_creation datetime NOT NULL,
tms timestamp NOT NULL,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat integer NOT NULL,
fk_user_modif integer,
import_key varchar(14),
@ -433,7 +433,7 @@ CREATE TABLE llx_asset(
note_public text,
note_private text,
date_creation datetime NOT NULL,
tms timestamp NOT NULL,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat integer NOT NULL,
fk_user_modif integer,
import_key varchar(14),
@ -449,7 +449,7 @@ ALTER TABLE llx_asset ADD INDEX idx_asset_fk_asset_type (fk_asset_type);
create table llx_asset_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)
) ENGINE=innodb;
@ -458,7 +458,7 @@ create table llx_asset_type
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1 NOT NULL, -- multi company id
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
label varchar(50) NOT NULL,
accountancy_code_asset varchar(32),
accountancy_code_depreciation_asset varchar(32),
@ -473,7 +473,7 @@ ALTER TABLE llx_asset ADD CONSTRAINT fk_asset_asset_type FOREIGN KEY (fk_asset_t
create table llx_asset_type_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;

View File

@ -43,7 +43,7 @@ ALTER TABLE llx_facture ADD COLUMN pos_source varchar(32);
create table llx_facture_rec_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)
) ENGINE=innodb;
@ -182,7 +182,7 @@ CREATE TABLE llx_emailcollector_emailcollector(
note_public text,
note_private text,
date_creation datetime NOT NULL,
tms timestamp NOT NULL,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat integer NOT NULL,
fk_user_modif integer,
import_key varchar(14),
@ -202,7 +202,7 @@ CREATE TABLE llx_emailcollector_emailcollectorfilter(
type varchar(128) NOT NULL,
rulevalue varchar(128) NULL,
date_creation datetime NOT NULL,
tms timestamp NOT NULL,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat integer NOT NULL,
fk_user_modif integer,
import_key varchar(14),
@ -217,7 +217,7 @@ CREATE TABLE llx_emailcollector_emailcollectoraction(
type varchar(128) NOT NULL,
actionparam varchar(255) NULL,
date_creation datetime NOT NULL,
tms timestamp NOT NULL,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat integer NOT NULL,
fk_user_modif integer,
position integer DEFAULT 0,

View File

@ -87,7 +87,7 @@ create table llx_mailing_unsubscribe
unsubscribegroup varchar(128) DEFAULT '',
ip varchar(128),
date_creat datetime, -- creation date
tms timestamp
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)ENGINE=innodb;
ALTER TABLE llx_mailing_unsubscribe ADD UNIQUE uk_mailing_unsubscribe(email, entity, unsubscribegroup);
@ -223,7 +223,7 @@ CREATE TABLE llx_bom_bom(
qty double(24,8),
efficiency double(8,4),
date_creation datetime NOT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
date_valid datetime,
fk_user_creat integer NOT NULL,
fk_user_modif integer,
@ -240,7 +240,7 @@ ALTER TABLE llx_bom_bom ADD COLUMN date_valid datetime;
create table llx_bom_bom_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;
@ -266,7 +266,7 @@ ALTER TABLE llx_bom_bomline ADD COLUMN position integer NOT NULL;
create table llx_bom_bomline_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;
@ -335,7 +335,7 @@ UPDATE llx_c_shipment_mode SET label = 'https://www.laposte.fr/outils/suivre-vos
create table llx_reception
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
ref varchar(30) NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
fk_soc integer NOT NULL,
@ -383,7 +383,7 @@ ALTER TABLE llx_reception ADD INDEX idx_reception_fk_shipping_method (fk_shippin
create table llx_reception_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;

View File

@ -24,7 +24,7 @@ create table llx_accounting_account
rowid bigint AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1 NOT NULL,
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_pcg_version varchar(32) NOT NULL, -- Chart system
pcg_type varchar(20) NOT NULL, -- First part of Key for predefined groups
account_number varchar(32) NOT NULL,

View File

@ -45,7 +45,7 @@ CREATE TABLE llx_accounting_bookkeeping
fk_user_author integer NOT NULL, -- | user creating
fk_user_modif integer, -- | user making last change
date_creation datetime, -- FEC:EcritureDate | creation date
tms timestamp, -- | last modification date
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- | last modification date
fk_user integer NULL, -- The id of user that validate the accounting source document
code_journal varchar(32) NOT NULL, -- FEC:JournalCode
journal_label varchar(255), -- FEC:JournalLib

View File

@ -44,7 +44,7 @@ CREATE TABLE llx_accounting_bookkeeping_tmp
fk_user_author integer NOT NULL, -- | user creating
fk_user_modif integer, -- | user making last change
date_creation datetime, -- FEC:EcritureDate | creation date
tms timestamp, -- | last modification date
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- | last modification date
fk_user integer NULL, -- The id of user that validate the accounting source document
code_journal varchar(32) NOT NULL, -- FEC:JournalCode
journal_label varchar(255), -- FEC:JournalLib

View File

@ -25,7 +25,7 @@ create table llx_accounting_fiscalyear
statut tinyint DEFAULT 0 NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
datec datetime NOT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_author integer DEFAULT NULL,
fk_user_modif integer DEFAULT NULL
)ENGINE=innodb;

View File

@ -33,7 +33,7 @@ create table llx_actioncomm
code varchar(50) NULL, -- code of action for automatic action ('AC_OTH_AUTO' for automatic actions, 'AC_EMAILIN_AUTO' for email input, 'AC_xxx' for manual action...)
datec datetime, -- date creation
tms timestamp, -- last modification date
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
fk_user_author integer, -- user id of user that has created record
fk_user_mod integer, -- user id of user that has modified record

View File

@ -19,7 +19,7 @@
create table llx_actioncomm_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;

View File

@ -72,7 +72,7 @@ create table llx_adherent
model_pdf varchar(255),
datevalid datetime, -- date de validation
datec datetime, -- date de creation
tms timestamp, -- last modification date
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
fk_user_author integer, -- can be null because member can be create by a guest
fk_user_mod integer,
fk_user_valid integer,

View File

@ -21,7 +21,7 @@
create table llx_adherent_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- member id
import_key varchar(14) -- import key
)ENGINE=innodb;

View File

@ -26,7 +26,7 @@ create table llx_adherent_type
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1 NOT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
statut smallint NOT NULL DEFAULT 0,
libelle varchar(50) NOT NULL,
morphy varchar(3) NOT NULL,

View File

@ -19,7 +19,7 @@
create table llx_adherent_type_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;

View File

@ -28,5 +28,5 @@ CREATE TABLE llx_advtargetemailing
fk_user_author integer NOT NULL,
datec datetime NOT NULL,
fk_user_mod integer NOT NULL,
tms timestamp NOT NULL
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL
)ENGINE=innodb;

View File

@ -26,7 +26,7 @@ CREATE TABLE llx_asset(
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),

View File

@ -16,7 +16,7 @@
create table llx_asset_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;

View File

@ -17,7 +17,7 @@ create table llx_asset_type
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1 NOT NULL, -- multi company id
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
label varchar(50) NOT NULL,
accountancy_code_asset varchar(32),
accountancy_code_depreciation_asset varchar(32),

View File

@ -16,7 +16,7 @@
create table llx_asset_type_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;

View File

@ -21,7 +21,7 @@ create table llx_bank
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datev date, -- date de valeur
dateo date, -- date operation
amount double(24,8) NOT NULL default 0,

View File

@ -26,7 +26,7 @@ create table llx_bank_account
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
ref varchar(12) NOT NULL,
label varchar(30) NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id

View File

@ -19,7 +19,7 @@
create table llx_bank_account_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;

View File

@ -21,7 +21,7 @@ CREATE TABLE llx_blockedlog
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1 NOT NULL,
date_creation datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
action varchar(50),
amounts double(24,8) NOT NULL,
element varchar(50),

View File

@ -3,5 +3,5 @@ CREATE TABLE llx_blockedlog_authority
rowid integer AUTO_INCREMENT PRIMARY KEY,
blockchain longtext NOT NULL,
signature varchar(100) NOT NULL,
tms timestamp
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=innodb;

View File

@ -31,7 +31,7 @@ CREATE TABLE llx_bom_bom(
duration double(24,8) DEFAULT NULL,
date_creation datetime NOT NULL,
date_valid datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat integer NOT NULL,
fk_user_modif integer,
fk_user_valid integer,

View File

@ -16,7 +16,7 @@
create table llx_bom_bom_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;

View File

@ -16,7 +16,7 @@
create table llx_bom_bomline_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;

View File

@ -33,7 +33,7 @@ create table llx_bordereau_cheque
fk_bank_account integer,
fk_user_author integer,
statut smallint NOT NULL DEFAULT 0,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
note text,
entity integer DEFAULT 1 NOT NULL -- multi company id
)ENGINE=innodb;

View File

@ -23,6 +23,6 @@ create table llx_boxes_def
rowid integer AUTO_INCREMENT PRIMARY KEY,
file varchar(200) NOT NULL, -- Do not increase this as file+note must be small to allow index
entity integer DEFAULT 1 NOT NULL, -- multi company id
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
note varchar(130) -- Do not increase this as file+note must be small to allow index
)ENGINE=innodb;

View File

@ -26,7 +26,7 @@ create table llx_budget
date_start date,
date_end date,
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat integer,
fk_user_modif integer,
import_key integer

View File

@ -23,7 +23,7 @@ create table llx_budget_lines
fk_project_ids varchar(180) NOT NULL, -- 'IDS:x,y' = List of project ids related to this budget. If budget is dedicated to projects not yet started, we recommand to create a project 'Projects to come'. 'FILTER:ref=*ABC' or 'FILTER:categid=123' = Can also be a dynamic rule to select projects.
amount double(24,8) NOT NULL,
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat integer,
fk_user_modif integer,
import_key integer

View File

@ -23,7 +23,7 @@ create table llx_c_email_senderprofile
entity integer DEFAULT 1 NOT NULL, -- multi company id
private smallint DEFAULT 0 NOT NULL, -- Template public (0) or private (id of user)
date_creation datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
label varchar(255), -- Label of predefined email
email varchar(255) NOT NULL, -- Email
signature text, -- Predefined signature

View File

@ -27,7 +27,7 @@ create table llx_c_email_templates
private smallint DEFAULT 0 NOT NULL, -- Template public or private
fk_user integer, -- Id user owner if template is private, or null
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
label varchar(180), -- Label of predefined email
position smallint, -- Position
enabled varchar(255) DEFAULT '1', -- Condition to have this module visible

View File

@ -24,7 +24,7 @@
create table llx_c_field_list
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
element varchar(64) NOT NULL, -- name of element list
entity integer DEFAULT 1 NOT NULL, -- entity id
name varchar(32) NOT NULL, -- name of field with table alias (ex: p.ref)

View File

@ -20,7 +20,7 @@ create table llx_c_shipment_mode
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1 NOT NULL, -- multi company id
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
code varchar(30) NOT NULL,
libelle varchar(50) NOT NULL,
description text,

View File

@ -32,7 +32,7 @@ create table llx_categorie
fk_soc integer DEFAULT NULL, -- not used by default. Used when option CATEGORY_ASSIGNED_TO_A_CUSTOMER is set.
visible tinyint DEFAULT 1 NOT NULL, -- determine if the products are visible or not
date_creation datetime, -- date creation
tms timestamp, -- last modification date
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
fk_user_creat integer, -- user making creation
fk_user_modif integer, -- user making last change
import_key varchar(14) -- Import key

View File

@ -19,7 +19,7 @@
create table llx_categories_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;

View File

@ -25,7 +25,7 @@ create table llx_chargesociales
date_ech datetime NOT NULL, -- date echeance
libelle varchar(80) NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
date_creation datetime, -- date de creation
date_valid datetime, -- date de validation
fk_user_author integer, -- user making creation

View File

@ -32,7 +32,7 @@ create table llx_commande
fk_soc integer NOT NULL,
fk_projet integer DEFAULT NULL, -- projet auquel est rattache la commande
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
date_creation datetime, -- date de creation
date_valid datetime, -- date de validation
date_cloture datetime, -- date de cloture

View File

@ -19,7 +19,7 @@
create table llx_commande_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;

View File

@ -32,7 +32,7 @@ create table llx_commande_fournisseur
fk_soc integer NOT NULL,
fk_projet integer DEFAULT 0, -- project id
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
date_creation datetime, -- date de creation
date_valid datetime, -- date de validation
date_approve datetime, -- date de approve

View File

@ -36,5 +36,5 @@ create table llx_commande_fournisseur_dispatch
sellby date DEFAULT NULL,
status integer,
datec datetime,
tms timestamp
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)ENGINE=innodb;

View File

@ -19,7 +19,7 @@
create table llx_commande_fournisseur_dispatch_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- object id
import_key varchar(14) -- import key
)ENGINE=innodb;

View File

@ -23,7 +23,7 @@
create table llx_commande_fournisseur_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)
) ENGINE=innodb;

View File

@ -20,7 +20,7 @@
create table llx_commande_fournisseur_log
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datelog datetime NOT NULL,
fk_commande integer NOT NULL,
fk_statut smallint NOT NULL,

View File

@ -24,7 +24,7 @@
create table llx_commande_fournisseurdet_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)
) ENGINE=innodb;

View File

@ -19,7 +19,7 @@
create table llx_commandedet_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- object id
import_key varchar(14) -- import key
)ENGINE=innodb;

View File

@ -19,7 +19,7 @@
CREATE TABLE llx_comment (
rowid integer AUTO_INCREMENT PRIMARY KEY,
datec datetime DEFAULT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
description text NOT NULL,
fk_user_author integer DEFAULT NULL,
fk_user_modif integer DEFAULT NULL,

View File

@ -32,7 +32,7 @@ create table llx_const
type varchar(64) DEFAULT 'string', -- null or 'encrypted' if param has been encrypted
visible tinyint DEFAULT 1 NOT NULL,
note text,
tms timestamp
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=innodb;
--

View File

@ -26,7 +26,7 @@ create table llx_contrat
ref_supplier varchar(255), -- supplier contract ref
ref_ext varchar(255), -- external contract ref
entity integer DEFAULT 1 NOT NULL, -- multi company id
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datec datetime, -- creation date
date_contrat datetime,
statut smallint DEFAULT 0, -- not used. deprecated

View File

@ -19,7 +19,7 @@
create table llx_contrat_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;

View File

@ -20,7 +20,7 @@
create table llx_contratdet
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_contrat integer NOT NULL,
fk_product integer NULL, -- doit pouvoir etre nul pour ligne detail sans produits

View File

@ -19,7 +19,7 @@
create table llx_contratdet_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- object id
import_key varchar(14) -- import key
)ENGINE=innodb;

View File

@ -19,7 +19,7 @@
create table llx_contratdet_log
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_contratdet integer NOT NULL,
date datetime NOT NULL,
statut smallint NOT NULL,

View File

@ -21,7 +21,7 @@
CREATE TABLE llx_cronjob
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datec datetime,
jobtype varchar(10) NOT NULL,
label text NOT NULL,

View File

@ -24,7 +24,7 @@ create table llx_deplacement
ref varchar(30) DEFAULT NULL, -- Ref donation (TODO change to NOT NULL)
entity integer DEFAULT 1 NOT NULL, -- multi company id
datec datetime NOT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
dated datetime,
fk_user integer NOT NULL,
fk_user_author integer,

View File

@ -25,7 +25,7 @@ create table llx_don
rowid integer AUTO_INCREMENT PRIMARY KEY,
ref varchar(30) DEFAULT NULL, -- Ref donation (TODO change to NOT NULL)
entity integer DEFAULT 1 NOT NULL, -- multi company id
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_statut smallint NOT NULL DEFAULT 0, -- Status of donation promise or validate
datedon datetime, -- Date of the donation/promise
amount double(24,8) DEFAULT 0,

View File

@ -19,7 +19,7 @@
create table llx_don_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;

View File

@ -30,7 +30,7 @@ CREATE TABLE llx_ecm_directories
fullpath varchar(750),
extraparams varchar(255), -- for stock other parameters with json format
date_c datetime,
date_m timestamp,
date_m timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_c integer,
fk_user_m integer,
acl text

View File

@ -19,7 +19,7 @@
CREATE TABLE llx_ecm_directories_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;

View File

@ -35,7 +35,7 @@ CREATE TABLE llx_ecm_files
gen_or_uploaded varchar(12), -- 'generated' or 'uploaded'
extraparams varchar(255), -- for stocking other parameters with json format
date_c datetime,
date_m timestamp,
date_m timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_c integer,
fk_user_m integer,
acl text -- for future permission 'per file'

View File

@ -19,7 +19,7 @@
CREATE TABLE llx_ecm_files_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;

View File

@ -28,5 +28,5 @@ CREATE TABLE llx_element_resources
mandatory integer,
duree real, -- total duration of using ressource
fk_user_create integer,
tms timestamp
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)ENGINE=innodb;

View File

@ -35,7 +35,7 @@ CREATE TABLE llx_emailcollector_emailcollector(
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),

View File

@ -21,7 +21,7 @@ CREATE TABLE llx_emailcollector_emailcollectoraction(
type varchar(128) NOT NULL,
actionparam varchar(255) 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,
position integer DEFAULT 0,

View File

@ -21,7 +21,7 @@ CREATE TABLE llx_emailcollector_emailcollectorfilter(
type varchar(128) NOT NULL,
rulevalue varchar(128) 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,
import_key varchar(14),

View File

@ -23,7 +23,7 @@ create table llx_entrepot
rowid integer AUTO_INCREMENT PRIMARY KEY,
ref varchar(255) NOT NULL,
datec datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
entity integer DEFAULT 1 NOT NULL, -- multi company id
description text,
lieu varchar(64), -- resume lieu situation

View File

@ -19,7 +19,7 @@
create table llx_entrepot_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;

View File

@ -36,7 +36,7 @@ CREATE TABLE llx_establishment (
fk_user_author integer NOT NULL,
fk_user_mod integer,
datec datetime NOT NULL,
tms timestamp NOT NULL,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL,
status tinyint DEFAULT 1
) ENGINE=innodb;

View File

@ -24,7 +24,7 @@
create table llx_events
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp, -- last modification date
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
type varchar(32) NOT NULL, -- action type
entity integer DEFAULT 1 NOT NULL, -- multi company id
prefix_session varchar(255) NULL, -- prefix of session, obtained with dol_getprefix

View File

@ -22,7 +22,7 @@
create table llx_expedition
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
ref varchar(30) NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
fk_soc integer NOT NULL,

View File

@ -19,7 +19,7 @@
create table llx_expedition_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;

View File

@ -19,7 +19,7 @@
create table llx_expeditiondet_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL, -- object id
import_key varchar(14) -- import key
)ENGINE=innodb;

View File

@ -34,7 +34,7 @@ CREATE TABLE llx_expensereport (
date_approve datetime,
date_refuse datetime,
date_cancel datetime,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_author integer NOT NULL, -- not the user author but the user the expense report is for
fk_user_modif integer DEFAULT NULL,
fk_user_valid integer DEFAULT NULL,

View File

@ -19,7 +19,7 @@
create table llx_expensereport_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;

View File

@ -21,7 +21,7 @@
CREATE TABLE IF NOT EXISTS llx_expensereport_ik (
rowid integer AUTO_INCREMENT PRIMARY KEY,
datec datetime DEFAULT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_c_exp_tax_cat integer DEFAULT 0 NOT NULL,
fk_range integer DEFAULT 0 NOT NULL,
coef double DEFAULT 0 NOT NULL,

View File

@ -20,7 +20,7 @@
CREATE TABLE llx_expensereport_rules (
rowid integer AUTO_INCREMENT PRIMARY KEY,
datec datetime DEFAULT NULL,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
dates datetime NOT NULL,
datee datetime NOT NULL,
amount double(24,8) NOT NULL,

View File

@ -43,5 +43,5 @@ create table llx_extrafields
fk_user_author integer, -- user making creation
fk_user_modif integer, -- user making last change
datec datetime, -- date de creation
tms timestamp -- last modification date
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP -- last modification date
)ENGINE=innodb;

View File

@ -39,7 +39,7 @@ create table llx_facture
datef date, -- date invoice
date_pointoftax date DEFAULT NULL, -- date point of tax (for GB)
date_valid date, -- date validation
tms timestamp, -- last modification date
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
date_closing datetime, -- date de cloture
paye smallint DEFAULT 0 NOT NULL,
--amount double(24,8) DEFAULT 0 NOT NULL,

View File

@ -19,7 +19,7 @@
create table llx_facture_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;

View File

@ -35,7 +35,7 @@ create table llx_facture_fourn
datef date, -- date de la facture
date_pointoftax date DEFAULT NULL, -- date point of tax (for GB)
date_valid date, -- date validation
tms timestamp, -- last modification date
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
libelle varchar(255),
paye smallint DEFAULT 0 NOT NULL,
amount double(24,8) DEFAULT 0 NOT NULL,

View File

@ -19,7 +19,7 @@
create table llx_facture_fourn_det_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;

View File

@ -19,7 +19,7 @@
create table llx_facture_fourn_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;

View File

@ -26,7 +26,7 @@ create table llx_facture_rec
entity integer DEFAULT 1 NOT NULL, -- multi company id
fk_soc integer NOT NULL,
datec datetime, -- date de creation
tms timestamp, -- last modification date
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
suspended integer DEFAULT 0, -- 1=suspended

Some files were not shown because too many files have changed in this diff Show More