Fix: Gestion des types tinyint et datetime.
This commit is contained in:
parent
a9eedc8f33
commit
16cd9c2a90
@ -156,6 +156,7 @@ foreach my $file (keys %filelist) {
|
|||||||
&reset_vars();
|
&reset_vars();
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (/(\w*)\s+enum\(((?:['"]\w+['"]\s*,)+['"]\w+['"])\)(.*)$/i) { # enum handling
|
if (/(\w*)\s+enum\(((?:['"]\w+['"]\s*,)+['"]\w+['"])\)(.*)$/i) { # enum handling
|
||||||
$enum_column=$1;
|
$enum_column=$1;
|
||||||
$enum_datafield{$enum_column} = $2; # 'abc','def', ...
|
$enum_datafield{$enum_column} = $2; # 'abc','def', ...
|
||||||
@ -184,12 +185,17 @@ foreach my $file (keys %filelist) {
|
|||||||
}
|
}
|
||||||
s/\w*int\(\d+\)/$out/g;
|
s/\w*int\(\d+\)/$out/g;
|
||||||
}
|
}
|
||||||
|
elsif (/tinyint/i) {
|
||||||
|
s/tinyint/smallint/g;
|
||||||
|
}
|
||||||
|
|
||||||
# nuke int unsigned
|
# nuke int unsigned
|
||||||
s/(int\w+)\s+unsigned/$1/gi;
|
s/(int\w+)\s+unsigned/$1/gi;
|
||||||
|
|
||||||
|
|
||||||
# blob -> text
|
# blob -> text
|
||||||
s/\w*blob/text/gi;
|
s/\w*blob/text/gi;
|
||||||
|
|
||||||
# tinytext/mediumtext -> text
|
# tinytext/mediumtext -> text
|
||||||
s/tinytext/text/gi;
|
s/tinytext/text/gi;
|
||||||
s/mediumtext/text/gi;
|
s/mediumtext/text/gi;
|
||||||
@ -207,6 +213,7 @@ foreach my $file (keys %filelist) {
|
|||||||
# change not null datetime field to null valid ones
|
# change not null datetime field to null valid ones
|
||||||
# (to support remapping of "zero time" to null
|
# (to support remapping of "zero time" to null
|
||||||
s/datetime not null/datetime/i;
|
s/datetime not null/datetime/i;
|
||||||
|
s/datetime/timestamp/i;
|
||||||
|
|
||||||
# nuke size of timestamp
|
# nuke size of timestamp
|
||||||
s/timestamp\([^)]*\)/timestamp/i;
|
s/timestamp\([^)]*\)/timestamp/i;
|
||||||
@ -215,12 +222,12 @@ foreach my $file (keys %filelist) {
|
|||||||
s/double\([^)]*\)/float8/i;
|
s/double\([^)]*\)/float8/i;
|
||||||
|
|
||||||
# add unique to definition of type (MySQL separates this)
|
# add unique to definition of type (MySQL separates this)
|
||||||
if (/unique \w+ \((\w+)\)/i) {
|
# if (/unique \w+ \((\w+)\)/i) {
|
||||||
$create_sql.=~s/($1)([^,]+)/$1$2 unique/i;
|
# $create_sql.=~s/($1)([^,]+)/$1$2 unique/i;
|
||||||
next;
|
# next;
|
||||||
}
|
# }
|
||||||
# FIX: unique for multipe columns (col1,col2) are unsupported!
|
# FIX: unique for multipe columns (col1,col2) are unsupported!
|
||||||
next if (/unique/i);
|
# next if (/unique/i);
|
||||||
|
|
||||||
if (/\bkey\b/i && !/^\s+primary key\s+/i) {
|
if (/\bkey\b/i && !/^\s+primary key\s+/i) {
|
||||||
s/KEY(\s+)[^(]*(\s+)/$1 UNIQUE $2/i; # hack off name of the non-primary key
|
s/KEY(\s+)[^(]*(\s+)/$1 UNIQUE $2/i; # hack off name of the non-primary key
|
||||||
|
|||||||
@ -37,8 +37,8 @@ create table llx_adherent
|
|||||||
"public" smallint NOT NULL DEFAULT 0, -- certain champ de la fiche sont ils public ou pas ?
|
"public" smallint NOT NULL DEFAULT 0, -- certain champ de la fiche sont ils public ou pas ?
|
||||||
"fk_adherent_type" smallint,
|
"fk_adherent_type" smallint,
|
||||||
"morphy" varchar(3) CHECK (morphy IN ('mor','phy')) NOT NULL, -- personne morale / personne physique
|
"morphy" varchar(3) CHECK (morphy IN ('mor','phy')) NOT NULL, -- personne morale / personne physique
|
||||||
"datevalid" datetime, -- date de validation
|
"datevalid" timestamp, -- date de validation
|
||||||
"datec" datetime, -- date de creation
|
"datec" timestamp, -- date de creation
|
||||||
"prenom" varchar(50),
|
"prenom" varchar(50),
|
||||||
"nom" varchar(50),
|
"nom" varchar(50),
|
||||||
"societe" varchar(50),
|
"societe" varchar(50),
|
||||||
@ -54,7 +54,8 @@ create table llx_adherent
|
|||||||
"fk_user_author" integer NOT NULL,
|
"fk_user_author" integer NOT NULL,
|
||||||
"fk_user_mod" integer NOT NULL,
|
"fk_user_mod" integer NOT NULL,
|
||||||
"fk_user_valid" integer NOT NULL,
|
"fk_user_valid" integer NOT NULL,
|
||||||
"datefin" datetime, -- date de fin de validité de la cotisation
|
"datefin" timestamp, -- date de fin de validité de la cotisation
|
||||||
"note" text,
|
"note" text,
|
||||||
|
|
||||||
|
"UNIQUE" INDEX(login)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -33,4 +33,5 @@ create table llx_adherent_options
|
|||||||
optid SERIAL PRIMARY KEY,
|
optid SERIAL PRIMARY KEY,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"adhid" integer NOT NULL, -- id de l'adherent auquel correspond ces attributs optionnel
|
"adhid" integer NOT NULL, -- id de l'adherent auquel correspond ces attributs optionnel
|
||||||
|
"UNIQUE" INDEX(adhid)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -33,7 +33,7 @@ create table llx_album
|
|||||||
"title" varchar(64),
|
"title" varchar(64),
|
||||||
"annee" int2,
|
"annee" int2,
|
||||||
"description" text,
|
"description" text,
|
||||||
"collectif" tinyint,
|
"collectif" smallint,
|
||||||
"fk_user_author" integer
|
"fk_user_author" integer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,7 @@
|
|||||||
create table llx_album_to_groupart
|
create table llx_album_to_groupart
|
||||||
(
|
(
|
||||||
"fk_album" integer NOT NULL,
|
"fk_album" integer NOT NULL,
|
||||||
"fk_groupart" integer NOT NULL
|
"fk_groupart" integer NOT NULL,
|
||||||
|
unique key(fk_album, fk_groupart)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
create table llx_appro
|
create table llx_appro
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"fk_product" integer NOT NULL,
|
"fk_product" integer NOT NULL,
|
||||||
"quantity" smallint unsigned NOT NULL,
|
"quantity" smallint unsigned NOT NULL,
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
create table llx_bank
|
create table llx_bank
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"datev" date, -- date de valeur
|
"datev" date, -- date de valeur
|
||||||
"dateo" date, -- date operation
|
"dateo" date, -- date operation
|
||||||
"amount" real NOT NULL default 0,
|
"amount" real NOT NULL default 0,
|
||||||
@ -40,7 +40,7 @@ create table llx_bank
|
|||||||
"fk_type" varchar(4), -- CB, Virement, cheque
|
"fk_type" varchar(4), -- CB, Virement, cheque
|
||||||
"num_releve" varchar(50),
|
"num_releve" varchar(50),
|
||||||
"num_chq" int,
|
"num_chq" int,
|
||||||
"rappro" tinyint default 0,
|
"rappro" smallint default 0,
|
||||||
"note" text,
|
"note" text,
|
||||||
"author" varchar(40) -- a supprimer apres migration
|
"author" varchar(40) -- a supprimer apres migration
|
||||||
);
|
);
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
create table llx_bank_account
|
create table llx_bank_account
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"label" varchar(30),
|
"label" varchar(30),
|
||||||
"bank" varchar(60),
|
"bank" varchar(60),
|
||||||
|
|||||||
@ -27,5 +27,5 @@ create table llx_bookmark
|
|||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_soc" integer,
|
"fk_soc" integer,
|
||||||
"fk_user" integer,
|
"fk_user" integer,
|
||||||
"dateb" datetime
|
"dateb" timestamp
|
||||||
);
|
);
|
||||||
|
|||||||
@ -29,5 +29,6 @@ create table llx_bookmark4u_login
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_user" integer,
|
"fk_user" integer,
|
||||||
"bk4u_uid" integer
|
"bk4u_uid" integer,
|
||||||
|
"UNIQUE" INDEX(fk_user)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -28,8 +28,9 @@
|
|||||||
create table llx_c_actioncomm
|
create table llx_c_actioncomm
|
||||||
(
|
(
|
||||||
id integer PRIMARY KEY,
|
id integer PRIMARY KEY,
|
||||||
|
"code" varchar(12) UNIQUE NOT NULL,
|
||||||
"type" varchar(10) DEFAULT 'system' NOT NULL,
|
"type" varchar(10) DEFAULT 'system' NOT NULL,
|
||||||
"libelle" varchar(30) NOT NULL,
|
"libelle" varchar(30) NOT NULL,
|
||||||
"active" tinyint DEFAULT 1 NOT NULL,
|
"active" smallint DEFAULT 1 NOT NULL,
|
||||||
"todo" tinyint
|
"todo" smallint
|
||||||
);
|
);
|
||||||
|
|||||||
@ -30,6 +30,6 @@ create table llx_c_ape
|
|||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
code_ape varchar(5) PRIMARY KEY,
|
code_ape varchar(5) PRIMARY KEY,
|
||||||
"libelle" varchar(255),
|
"libelle" varchar(255),
|
||||||
"active" tinyint DEFAULT 1 NOT NULL
|
"active" smallint DEFAULT 1 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ create table llx_c_chargesociales
|
|||||||
id integer PRIMARY KEY,
|
id integer PRIMARY KEY,
|
||||||
"libelle" varchar(80),
|
"libelle" varchar(80),
|
||||||
"deductible" smallint DEFAULT 0 NOT NULL,
|
"deductible" smallint DEFAULT 0 NOT NULL,
|
||||||
"active" tinyint DEFAULT 1 NOT NULL
|
"active" smallint DEFAULT 1 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,8 @@
|
|||||||
create table llx_c_civilite
|
create table llx_c_civilite
|
||||||
(
|
(
|
||||||
rowid integer PRIMARY KEY,
|
rowid integer PRIMARY KEY,
|
||||||
|
"code" varchar(6) UNIQUE NOT NULL,
|
||||||
"civilite" varchar(50),
|
"civilite" varchar(50),
|
||||||
"active" tinyint DEFAULT 1 NOT NULL
|
"active" smallint DEFAULT 1 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,9 @@
|
|||||||
|
|
||||||
create table llx_c_currencies
|
create table llx_c_currencies
|
||||||
(
|
(
|
||||||
|
code varchar(2) UNIQUE PRIMARY KEY,
|
||||||
|
"code_iso" varchar(3) UNIQUE NOT NULL,
|
||||||
"label" varchar(64),
|
"label" varchar(64),
|
||||||
"active" tinyint DEFAULT 1 NOT NULL
|
"active" smallint DEFAULT 1 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ create table llx_c_departements
|
|||||||
"tncc" integer,
|
"tncc" integer,
|
||||||
"ncc" varchar(50),
|
"ncc" varchar(50),
|
||||||
"nom" varchar(50),
|
"nom" varchar(50),
|
||||||
"active" tinyint DEFAULT 1 NOT NULL,
|
"active" smallint DEFAULT 1 NOT NULL,
|
||||||
key (fk_region)
|
key (fk_region)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,8 @@
|
|||||||
create table llx_c_effectif
|
create table llx_c_effectif
|
||||||
(
|
(
|
||||||
id integer PRIMARY KEY,
|
id integer PRIMARY KEY,
|
||||||
|
"code" varchar(12) UNIQUE NOT NULL,
|
||||||
"libelle" varchar(30),
|
"libelle" varchar(30),
|
||||||
"active" tinyint DEFAULT 1 NOT NULL
|
"active" smallint DEFAULT 1 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -29,8 +29,9 @@
|
|||||||
create table llx_c_forme_juridique
|
create table llx_c_forme_juridique
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"code" varchar(12) UNIQUE NOT NULL,
|
||||||
"fk_pays" integer NOT NULL,
|
"fk_pays" integer NOT NULL,
|
||||||
"libelle" varchar(255),
|
"libelle" varchar(255),
|
||||||
"active" tinyint DEFAULT 1 NOT NULL
|
"active" smallint DEFAULT 1 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -30,6 +30,6 @@ create table llx_c_methode_commande_fournisseur
|
|||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"code" varchar(30),
|
"code" varchar(30),
|
||||||
"libelle" varchar(30),
|
"libelle" varchar(30),
|
||||||
"active" tinyint default 1 NOT NULL
|
"active" smallint default 1 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -34,9 +34,10 @@
|
|||||||
create table llx_c_paiement
|
create table llx_c_paiement
|
||||||
(
|
(
|
||||||
id integer PRIMARY KEY,
|
id integer PRIMARY KEY,
|
||||||
|
"code" varchar(6) UNIQUE NOT NULL,
|
||||||
"libelle" varchar(30),
|
"libelle" varchar(30),
|
||||||
"type" smallint,
|
"type" smallint,
|
||||||
"active" tinyint DEFAULT 1 NOT NULL
|
"active" smallint DEFAULT 1 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -28,8 +28,9 @@
|
|||||||
create table llx_c_pays
|
create table llx_c_pays
|
||||||
(
|
(
|
||||||
rowid integer PRIMARY KEY,
|
rowid integer PRIMARY KEY,
|
||||||
|
"code" varchar(6) UNIQUE NOT NULL,
|
||||||
"libelle" varchar(25) NOT NULL,
|
"libelle" varchar(25) NOT NULL,
|
||||||
"active" tinyint DEFAULT 1 NOT NULL
|
"active" smallint DEFAULT 1 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,8 @@
|
|||||||
create table llx_c_propalst
|
create table llx_c_propalst
|
||||||
(
|
(
|
||||||
id smallint PRIMARY KEY,
|
id smallint PRIMARY KEY,
|
||||||
|
"code" varchar(12) UNIQUE NOT NULL,
|
||||||
"label" varchar(30),
|
"label" varchar(30),
|
||||||
"active" tinyint DEFAULT 1 NOT NULL
|
"active" smallint DEFAULT 1 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -28,10 +28,11 @@
|
|||||||
create table llx_c_regions
|
create table llx_c_regions
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"code_region" integer UNIQUE NOT NULL,
|
||||||
"fk_pays" integer NOT NULL,
|
"fk_pays" integer NOT NULL,
|
||||||
"cheflieu" varchar(7),
|
"cheflieu" varchar(7),
|
||||||
"tncc" integer,
|
"tncc" integer,
|
||||||
"nom" varchar(50),
|
"nom" varchar(50),
|
||||||
"active" tinyint DEFAULT 1 NOT NULL
|
"active" smallint DEFAULT 1 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,8 @@
|
|||||||
create table llx_c_stcomm
|
create table llx_c_stcomm
|
||||||
(
|
(
|
||||||
id integer PRIMARY KEY,
|
id integer PRIMARY KEY,
|
||||||
|
"code" varchar(12) UNIQUE NOT NULL,
|
||||||
"libelle" varchar(30),
|
"libelle" varchar(30),
|
||||||
"active" tinyint default 1 NOT NULL
|
"active" smallint default 1 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,7 @@
|
|||||||
create table llx_c_typent
|
create table llx_c_typent
|
||||||
(
|
(
|
||||||
id integer PRIMARY KEY,
|
id integer PRIMARY KEY,
|
||||||
|
"code" varchar(12) UNIQUE NOT NULL,
|
||||||
"libelle" varchar(30),
|
"libelle" varchar(30),
|
||||||
"active" tinyint DEFAULT 1 NOT NULL
|
"active" smallint DEFAULT 1 NOT NULL
|
||||||
);
|
);
|
||||||
|
|||||||
@ -27,8 +27,8 @@
|
|||||||
create table llx_chargesociales
|
create table llx_chargesociales
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"date_ech" datetime, -- date d'echeance
|
"date_ech" timestamp, -- date d'echeance
|
||||||
"date_pai" datetime, -- date de paiements
|
"date_pai" timestamp, -- date de paiements
|
||||||
"libelle" varchar(80),
|
"libelle" varchar(80),
|
||||||
"fk_type" integer,
|
"fk_type" integer,
|
||||||
"amount" real default 0 NOT NULL,
|
"amount" real default 0 NOT NULL,
|
||||||
|
|||||||
@ -32,9 +32,9 @@ create table llx_commande
|
|||||||
"fk_soc_contact" integer,
|
"fk_soc_contact" integer,
|
||||||
"fk_projet" integer DEFAULT 0, -- projet auquel est rattache la commande
|
"fk_projet" integer DEFAULT 0, -- projet auquel est rattache la commande
|
||||||
"ref" varchar(30) NOT NULL, -- propal number
|
"ref" varchar(30) NOT NULL, -- propal number
|
||||||
"date_creation" datetime, -- date de creation
|
"date_creation" timestamp, -- date de creation
|
||||||
"date_valid" datetime, -- date de validation
|
"date_valid" timestamp, -- date de validation
|
||||||
"date_cloture" datetime, -- date de cloture
|
"date_cloture" timestamp, -- date de cloture
|
||||||
"date_commande" date, -- date de la commande
|
"date_commande" date, -- date de la commande
|
||||||
"fk_user_author" integer, -- createur de la commande
|
"fk_user_author" integer, -- createur de la commande
|
||||||
"fk_user_valid" integer, -- valideur de la commande
|
"fk_user_valid" integer, -- valideur de la commande
|
||||||
@ -49,5 +49,6 @@ create table llx_commande
|
|||||||
"total_ttc" real default 0,
|
"total_ttc" real default 0,
|
||||||
"note" text,
|
"note" text,
|
||||||
"model_pdf" varchar(50),
|
"model_pdf" varchar(50),
|
||||||
"facture" tinyint default 0,
|
"facture" smallint default 0,
|
||||||
4294967294);
|
"UNIQUE" INDEX (ref)
|
||||||
|
);
|
||||||
|
|||||||
@ -33,9 +33,9 @@ create table llx_commande_fournisseur
|
|||||||
"fk_soc_contact" integer,
|
"fk_soc_contact" integer,
|
||||||
"fk_projet" integer DEFAULT 0, -- projet auquel est rattache la commande
|
"fk_projet" integer DEFAULT 0, -- projet auquel est rattache la commande
|
||||||
"ref" varchar(30) NOT NULL, -- propal number
|
"ref" varchar(30) NOT NULL, -- propal number
|
||||||
"date_creation" datetime, -- date de creation
|
"date_creation" timestamp, -- date de creation
|
||||||
"date_valid" datetime, -- date de validation
|
"date_valid" timestamp, -- date de validation
|
||||||
"date_cloture" datetime, -- date de cloture
|
"date_cloture" timestamp, -- date de cloture
|
||||||
"date_commande" date, -- date de la commande
|
"date_commande" date, -- date de la commande
|
||||||
"fk_methode_commande" integer default 0,
|
"fk_methode_commande" integer default 0,
|
||||||
"fk_user_author" integer, -- createur de la commande
|
"fk_user_author" integer, -- createur de la commande
|
||||||
@ -51,4 +51,5 @@ create table llx_commande_fournisseur
|
|||||||
"total_ttc" real default 0,
|
"total_ttc" real default 0,
|
||||||
"note" text,
|
"note" text,
|
||||||
"model_pdf" varchar(50),
|
"model_pdf" varchar(50),
|
||||||
4294967294);
|
"UNIQUE" INDEX (ref)
|
||||||
|
);
|
||||||
|
|||||||
@ -28,7 +28,7 @@ create table llx_commande_fournisseur_log
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"datelog" datetime,
|
"datelog" timestamp,
|
||||||
"fk_commande" integer NOT NULL,
|
"fk_commande" integer NOT NULL,
|
||||||
"fk_statut" smallint NOT NULL,
|
"fk_statut" smallint NOT NULL,
|
||||||
"fk_user" integer NOT NULL
|
"fk_user" integer NOT NULL
|
||||||
|
|||||||
@ -28,13 +28,13 @@
|
|||||||
create table llx_compta
|
create table llx_compta
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"datev" date, -- date de valeur
|
"datev" date, -- date de valeur
|
||||||
"amount" real DEFAULT 0 NOT NULL ,
|
"amount" real DEFAULT 0 NOT NULL ,
|
||||||
"label" varchar(255),
|
"label" varchar(255),
|
||||||
"fk_compta_account" integer,
|
"fk_compta_account" integer,
|
||||||
"fk_user_author" integer,
|
"fk_user_author" integer,
|
||||||
"fk_user_valid" integer,
|
"fk_user_valid" integer,
|
||||||
"valid" tinyint DEFAULT 0,
|
"valid" smallint DEFAULT 0,
|
||||||
"note" text
|
"note" text
|
||||||
);
|
);
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
create table llx_compta_account
|
create table llx_compta_account
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"number" varchar(12),
|
"number" varchar(12),
|
||||||
"label" varchar(255),
|
"label" varchar(255),
|
||||||
"fk_user_author" integer,
|
"fk_user_author" integer,
|
||||||
|
|||||||
@ -28,9 +28,10 @@
|
|||||||
create table llx_compta_compte_generaux
|
create table llx_compta_compte_generaux
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"date_creation" datetime,
|
"date_creation" timestamp,
|
||||||
"numero" varchar(50),
|
"numero" varchar(50),
|
||||||
"intitule" varchar(255),
|
"intitule" varchar(255),
|
||||||
"fk_user_author" integer,
|
"fk_user_author" integer,
|
||||||
"note" text
|
"note" text,
|
||||||
|
"UNIQUE"(numero)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -28,9 +28,9 @@ create table llx_concert
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"date_concert" datetime,
|
"date_concert" timestamp,
|
||||||
"description" text,
|
"description" text,
|
||||||
"collectif" tinyint DEFAULT 0 NOT NULL,
|
"collectif" smallint DEFAULT 0 NOT NULL,
|
||||||
"fk_groupart" integer,
|
"fk_groupart" integer,
|
||||||
"fk_lieu_concert" integer,
|
"fk_lieu_concert" integer,
|
||||||
"fk_user_author" integer
|
"fk_user_author" integer
|
||||||
|
|||||||
@ -29,9 +29,9 @@ create table llx_cond_reglement
|
|||||||
rowid integer PRIMARY KEY,
|
rowid integer PRIMARY KEY,
|
||||||
"code" varchar(16),
|
"code" varchar(16),
|
||||||
"sortorder" smallint,
|
"sortorder" smallint,
|
||||||
"actif" tinyint DEFAULT 1,
|
"actif" smallint DEFAULT 1,
|
||||||
"libelle" varchar(255),
|
"libelle" varchar(255),
|
||||||
"libelle_facture" text,
|
"libelle_facture" text,
|
||||||
"fdm" tinyint, -- reglement fin de mois
|
"fdm" smallint, -- reglement fin de mois
|
||||||
"nbjour" smallint
|
"nbjour" smallint
|
||||||
);
|
);
|
||||||
|
|||||||
@ -35,6 +35,7 @@ create table llx_const
|
|||||||
"name" varchar(255),
|
"name" varchar(255),
|
||||||
"value" text, -- max 65535 caracteres
|
"value" text, -- max 65535 caracteres
|
||||||
"type" varchar(6) CHECK (type IN ('yesno','texte','chaine')) ,
|
"type" varchar(6) CHECK (type IN ('yesno','texte','chaine')) ,
|
||||||
"visible" tinyint DEFAULT 1 NOT NULL,
|
"visible" smallint DEFAULT 1 NOT NULL,
|
||||||
"note" text
|
"note" text,
|
||||||
|
"UNIQUE" INDEX(name)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -32,4 +32,5 @@ create table llx_contact_facture
|
|||||||
idp SERIAL PRIMARY KEY,
|
idp SERIAL PRIMARY KEY,
|
||||||
"fk_soc" integer NOT NULL,
|
"fk_soc" integer NOT NULL,
|
||||||
"fk_contact" integer NOT NULL, -- point sur llx_socpeople
|
"fk_contact" integer NOT NULL, -- point sur llx_socpeople
|
||||||
|
"UNIQUE" (fk_soc, fk_contact)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -31,12 +31,12 @@ create table llx_contrat
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"datec" datetime, -- date de creation de l'enregistrement
|
"datec" timestamp, -- date de creation de l'enregistrement
|
||||||
"date_contrat" datetime,
|
"date_contrat" timestamp,
|
||||||
"statut" smallint DEFAULT 0,
|
"statut" smallint DEFAULT 0,
|
||||||
"mise_en_service" datetime,
|
"mise_en_service" timestamp,
|
||||||
"fin_validite" datetime,
|
"fin_validite" timestamp,
|
||||||
"date_cloture" datetime,
|
"date_cloture" timestamp,
|
||||||
"fk_soc" integer NOT NULL,
|
"fk_soc" integer NOT NULL,
|
||||||
"fk_commercial_signature" integer NOT NULL,
|
"fk_commercial_signature" integer NOT NULL,
|
||||||
"fk_commercial_suivi" integer NOT NULL,
|
"fk_commercial_suivi" integer NOT NULL,
|
||||||
|
|||||||
@ -40,11 +40,11 @@ create table llx_contratdet
|
|||||||
"statut" smallint DEFAULT 0,
|
"statut" smallint DEFAULT 0,
|
||||||
"label" text, -- libellé du produit
|
"label" text, -- libellé du produit
|
||||||
"description" text,
|
"description" text,
|
||||||
"date_commande" datetime,
|
"date_commande" timestamp,
|
||||||
"date_ouverture_prevue" datetime,
|
"date_ouverture_prevue" timestamp,
|
||||||
"date_ouverture" datetime, -- date d'ouverture du service chez le client
|
"date_ouverture" timestamp, -- date d'ouverture du service chez le client
|
||||||
"date_fin_validite" datetime,
|
"date_fin_validite" timestamp,
|
||||||
"date_cloture" datetime,
|
"date_cloture" timestamp,
|
||||||
"tva_tx" real DEFAULT 19.6, -- taux tva
|
"tva_tx" real DEFAULT 19.6, -- taux tva
|
||||||
"qty" real, -- quantité
|
"qty" real, -- quantité
|
||||||
"remise_percent" real DEFAULT 0, -- pourcentage de remise
|
"remise_percent" real DEFAULT 0, -- pourcentage de remise
|
||||||
|
|||||||
@ -30,7 +30,7 @@ create table llx_contratdet_log
|
|||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"fk_contratdet" integer NOT NULL,
|
"fk_contratdet" integer NOT NULL,
|
||||||
"date" datetime,
|
"date" timestamp,
|
||||||
"statut" smallint NOT NULL,
|
"statut" smallint NOT NULL,
|
||||||
"fk_user_author" integer NOT NULL,
|
"fk_user_author" integer NOT NULL,
|
||||||
"commentaire" text
|
"commentaire" text
|
||||||
|
|||||||
@ -27,9 +27,9 @@ create table llx_cotisation
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"fk_adherent" integer,
|
"fk_adherent" integer,
|
||||||
"dateadh" datetime,
|
"dateadh" timestamp,
|
||||||
"cotisation" real,
|
"cotisation" real,
|
||||||
"fk_bank" int4 DEFAULT NULL,
|
"fk_bank" int4 DEFAULT NULL,
|
||||||
"note" text
|
"note" text
|
||||||
|
|||||||
@ -27,9 +27,9 @@
|
|||||||
create table llx_deplacement
|
create table llx_deplacement
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"dated" datetime,
|
"dated" timestamp,
|
||||||
"fk_user" integer NOT NULL,
|
"fk_user" integer NOT NULL,
|
||||||
"fk_user_author" integer,
|
"fk_user_author" integer,
|
||||||
"type" smallint NOT NULL,
|
"type" smallint NOT NULL,
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
create table llx_domain
|
create table llx_domain
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"label" varchar(255),
|
"label" varchar(255),
|
||||||
"note" text
|
"note" text
|
||||||
);
|
);
|
||||||
|
|||||||
@ -29,8 +29,8 @@ create table llx_don
|
|||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"fk_statut" smallint NOT NULL DEFAULT 0,-- etat du don promesse/valid
|
"fk_statut" smallint NOT NULL DEFAULT 0,-- etat du don promesse/valid
|
||||||
"datec" datetime, -- date de création de l'enregistrement
|
"datec" timestamp, -- date de création de l'enregistrement
|
||||||
"datedon" datetime, -- date du don/promesse
|
"datedon" timestamp, -- date du don/promesse
|
||||||
"amount" real DEFAULT 0,
|
"amount" real DEFAULT 0,
|
||||||
"fk_paiement" integer,
|
"fk_paiement" integer,
|
||||||
"prenom" varchar(50),
|
"prenom" varchar(50),
|
||||||
|
|||||||
@ -28,7 +28,7 @@ create table llx_don_projet
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"libelle" varchar(255),
|
"libelle" varchar(255),
|
||||||
"fk_user_author" integer NOT NULL,
|
"fk_user_author" integer NOT NULL,
|
||||||
"note" text
|
"note" text
|
||||||
|
|||||||
@ -28,11 +28,11 @@
|
|||||||
create table llx_entrepot
|
create table llx_entrepot
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"label" varchar(255) NOT NULL,
|
"label" varchar(255) NOT NULL,
|
||||||
"description" text,
|
"description" text,
|
||||||
"statut" tinyint DEFAULT 1, -- 1 ouvert, 0 fermé
|
"statut" smallint DEFAULT 1, -- 1 ouvert, 0 fermé
|
||||||
"fk_user_author" integer
|
"fk_user_author" integer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -31,8 +31,8 @@ create table llx_expedition
|
|||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"ref" varchar(30) NOT NULL,
|
"ref" varchar(30) NOT NULL,
|
||||||
"fk_commande" integer,
|
"fk_commande" integer,
|
||||||
"date_creation" datetime, -- date de creation
|
"date_creation" timestamp, -- date de creation
|
||||||
"date_valid" datetime, -- date de validation
|
"date_valid" timestamp, -- date de validation
|
||||||
"date_expedition" date, -- date de l'expedition
|
"date_expedition" date, -- date de l'expedition
|
||||||
"fk_user_author" integer, -- createur
|
"fk_user_author" integer, -- createur
|
||||||
"fk_user_valid" integer, -- valideur
|
"fk_user_valid" integer, -- valideur
|
||||||
@ -41,7 +41,8 @@ create table llx_expedition
|
|||||||
"fk_statut" smallint DEFAULT 0,
|
"fk_statut" smallint DEFAULT 0,
|
||||||
"note" text,
|
"note" text,
|
||||||
"model_pdf" varchar(50),
|
"model_pdf" varchar(50),
|
||||||
4294967294);
|
"UNIQUE" INDEX (ref)
|
||||||
|
);
|
||||||
|
|
||||||
CREATE INDEX llx_expedition_fk_expedition_methode ON llx_expedition (fk_expedition_methode);
|
CREATE INDEX llx_expedition_fk_expedition_methode ON llx_expedition (fk_expedition_methode);
|
||||||
CREATE INDEX llx_expedition_fk_commande ON llx_expedition (fk_commande);
|
CREATE INDEX llx_expedition_fk_commande ON llx_expedition (fk_commande);
|
||||||
|
|||||||
@ -31,5 +31,5 @@ create table llx_expedition_methode
|
|||||||
"code" varchar(30) NOT NULL,
|
"code" varchar(30) NOT NULL,
|
||||||
"libelle" varchar(50) NOT NULL,
|
"libelle" varchar(50) NOT NULL,
|
||||||
"description" text,
|
"description" text,
|
||||||
"statut" tinyint DEFAULT 0
|
"statut" smallint DEFAULT 0
|
||||||
);
|
);
|
||||||
|
|||||||
@ -30,7 +30,7 @@ create table llx_export_compta
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"ref" varchar(12) NOT NULL,
|
"ref" varchar(12) NOT NULL,
|
||||||
"date_export" datetime, -- date de creation
|
"date_export" timestamp, -- date de creation
|
||||||
"fk_user" integer NOT NULL,
|
"fk_user" integer NOT NULL,
|
||||||
"note" text
|
"note" text
|
||||||
);
|
);
|
||||||
|
|||||||
@ -30,7 +30,7 @@ create table llx_facture
|
|||||||
"facnumber" varchar(50) NOT NULL,
|
"facnumber" varchar(50) NOT NULL,
|
||||||
"increment" varchar(10),
|
"increment" varchar(10),
|
||||||
"fk_soc" integer NOT NULL,
|
"fk_soc" integer NOT NULL,
|
||||||
"datec" datetime, -- date de creation de la facture
|
"datec" timestamp, -- date de creation de la facture
|
||||||
"datef" date, -- date de la facture
|
"datef" date, -- date de la facture
|
||||||
"paye" smallint DEFAULT 0 NOT NULL,
|
"paye" smallint DEFAULT 0 NOT NULL,
|
||||||
"amount" real DEFAULT 0 NOT NULL,
|
"amount" real DEFAULT 0 NOT NULL,
|
||||||
@ -49,5 +49,6 @@ create table llx_facture
|
|||||||
"fk_mode_reglement" integer, -- mode de reglement (Virement, Prélèvement)
|
"fk_mode_reglement" integer, -- mode de reglement (Virement, Prélèvement)
|
||||||
"date_lim_reglement" date, -- date limite de reglement
|
"date_lim_reglement" date, -- date limite de reglement
|
||||||
"note" text,
|
"note" text,
|
||||||
4294967294 "INDEX" fksoc (fk_soc)
|
"UNIQUE" INDEX (facnumber),
|
||||||
|
"INDEX" fksoc (fk_soc)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -33,7 +33,7 @@ create table llx_facture_fourn
|
|||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"facnumber" varchar(50) NOT NULL,
|
"facnumber" varchar(50) NOT NULL,
|
||||||
"fk_soc" integer NOT NULL,
|
"fk_soc" integer NOT NULL,
|
||||||
"datec" datetime, -- date de creation de la facture
|
"datec" timestamp, -- date de creation de la facture
|
||||||
"datef" date, -- date de la facture
|
"datef" date, -- date de la facture
|
||||||
"libelle" varchar(255),
|
"libelle" varchar(255),
|
||||||
"paye" smallint DEFAULT 0 NOT NULL,
|
"paye" smallint DEFAULT 0 NOT NULL,
|
||||||
@ -47,5 +47,6 @@ create table llx_facture_fourn
|
|||||||
"fk_statut" smallint DEFAULT 0 NOT NULL,
|
"fk_statut" smallint DEFAULT 0 NOT NULL,
|
||||||
"fk_user_author" integer, -- createur de la facture
|
"fk_user_author" integer, -- createur de la facture
|
||||||
"fk_user_valid" integer, -- valideur de la facture
|
"fk_user_valid" integer, -- valideur de la facture
|
||||||
"note" text
|
"note" text,
|
||||||
|
"UNIQUE" INDEX (facnumber, fk_soc)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -32,7 +32,7 @@ create table llx_facture_rec
|
|||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"titre" varchar(50) NOT NULL,
|
"titre" varchar(50) NOT NULL,
|
||||||
"fk_soc" integer NOT NULL,
|
"fk_soc" integer NOT NULL,
|
||||||
"datec" datetime, -- date de creation
|
"datec" timestamp, -- date de creation
|
||||||
"amount" real DEFAULT 0 NOT NULL,
|
"amount" real DEFAULT 0 NOT NULL,
|
||||||
"remise" real DEFAULT 0,
|
"remise" real DEFAULT 0,
|
||||||
"remise_percent" real DEFAULT 0,
|
"remise_percent" real DEFAULT 0,
|
||||||
|
|||||||
@ -37,8 +37,8 @@ create table llx_facturedet
|
|||||||
"remise" real DEFAULT 0, -- montant de la remise
|
"remise" real DEFAULT 0, -- montant de la remise
|
||||||
"subprice" real, -- prix avant remise
|
"subprice" real, -- prix avant remise
|
||||||
"price" real, -- prix final
|
"price" real, -- prix final
|
||||||
"date_start" datetime, -- date debut si service
|
"date_start" timestamp, -- date debut si service
|
||||||
"date_end" datetime, -- date fin si service
|
"date_end" timestamp, -- date fin si service
|
||||||
"fk_code_ventilation" integer DEFAULT 0 NOT NULL,
|
"fk_code_ventilation" integer DEFAULT 0 NOT NULL,
|
||||||
"fk_export_compta" integer DEFAULT 0 NOT NULL
|
"fk_export_compta" integer DEFAULT 0 NOT NULL
|
||||||
);
|
);
|
||||||
|
|||||||
@ -31,12 +31,13 @@ create table llx_fichinter
|
|||||||
"fk_soc" integer NOT NULL,
|
"fk_soc" integer NOT NULL,
|
||||||
"fk_projet" integer DEFAULT 0, -- projet auquel est rattache la fiche
|
"fk_projet" integer DEFAULT 0, -- projet auquel est rattache la fiche
|
||||||
"ref" varchar(30) NOT NULL, -- number
|
"ref" varchar(30) NOT NULL, -- number
|
||||||
"datec" datetime, -- date de creation
|
"datec" timestamp, -- date de creation
|
||||||
"date_valid" datetime, -- date de validation
|
"date_valid" timestamp, -- date de validation
|
||||||
"datei" date, -- date de l'intervention
|
"datei" date, -- date de l'intervention
|
||||||
"fk_user_author" integer, -- createur de la fiche
|
"fk_user_author" integer, -- createur de la fiche
|
||||||
"fk_user_valid" integer, -- valideur de la fiche
|
"fk_user_valid" integer, -- valideur de la fiche
|
||||||
"fk_statut" smallint DEFAULT 0,
|
"fk_statut" smallint DEFAULT 0,
|
||||||
"duree" real,
|
"duree" real,
|
||||||
"note" text,
|
"note" text,
|
||||||
4294967294);
|
"UNIQUE" INDEX (ref)
|
||||||
|
);
|
||||||
|
|||||||
@ -28,8 +28,9 @@
|
|||||||
create table llx_groupesociete
|
create table llx_groupesociete
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"parent" integer UNIQUE,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"datec" datetime, -- creation date
|
"datec" timestamp, -- creation date
|
||||||
"nom" varchar(60), -- company name
|
"nom" varchar(60), -- company name
|
||||||
"note" text, --
|
"note" text, --
|
||||||
"remise" real DEFAULT 0, -- remise systématique pour le client
|
"remise" real DEFAULT 0, -- remise systématique pour le client
|
||||||
|
|||||||
@ -32,7 +32,7 @@ create table llx_groupesociete_remise
|
|||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_groupe" integer NOT NULL,
|
"fk_groupe" integer NOT NULL,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"datec" datetime, -- creation date
|
"datec" timestamp, -- creation date
|
||||||
"fk_user_author" integer, -- utilisateur qui a créé l'info
|
"fk_user_author" integer, -- utilisateur qui a créé l'info
|
||||||
"remise" real DEFAULT 0, -- remise systématique pour le client
|
"remise" real DEFAULT 0, -- remise systématique pour le client
|
||||||
"note" text
|
"note" text
|
||||||
|
|||||||
@ -30,8 +30,8 @@ create table llx_livre
|
|||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"oscid" integer NOT NULL,
|
"oscid" integer NOT NULL,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"status" tinyint,
|
"status" smallint,
|
||||||
"date_ajout" datetime,
|
"date_ajout" timestamp,
|
||||||
"ref" varchar(12),
|
"ref" varchar(12),
|
||||||
"title" varchar(64),
|
"title" varchar(64),
|
||||||
"annee" int2,
|
"annee" int2,
|
||||||
@ -39,6 +39,7 @@ create table llx_livre
|
|||||||
"prix" decimal(15,4),
|
"prix" decimal(15,4),
|
||||||
"fk_editeur" integer,
|
"fk_editeur" integer,
|
||||||
"fk_user_author" integer,
|
"fk_user_author" integer,
|
||||||
"frais_de_port" tinyint DEFAULT 1
|
"frais_de_port" smallint DEFAULT 1,
|
||||||
|
"UNIQUE"(ref)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -28,5 +28,6 @@
|
|||||||
create table llx_livre_to_auteur
|
create table llx_livre_to_auteur
|
||||||
(
|
(
|
||||||
"fk_livre" integer NOT NULL,
|
"fk_livre" integer NOT NULL,
|
||||||
"fk_auteur" integer NOT NULL
|
"fk_auteur" integer NOT NULL,
|
||||||
|
"unique" index (fk_livre, fk_auteur)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -40,7 +40,7 @@ create table llx_mailing
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"statut" smallint DEFAULT 0, --
|
"statut" smallint DEFAULT 0, --
|
||||||
"date_envoi" datetime, -- date d'envoi
|
"date_envoi" timestamp, -- date d'envoi
|
||||||
"titre" varchar(60), -- company name
|
"titre" varchar(60), -- company name
|
||||||
"sujet" varchar(60), -- company name
|
"sujet" varchar(60), -- company name
|
||||||
"body" text,
|
"body" text,
|
||||||
@ -49,9 +49,9 @@ create table llx_mailing
|
|||||||
"email_from" varchar(160), -- company name
|
"email_from" varchar(160), -- company name
|
||||||
"email_replyto" varchar(160), -- company name
|
"email_replyto" varchar(160), -- company name
|
||||||
"email_errorsto" varchar(160), -- company name
|
"email_errorsto" varchar(160), -- company name
|
||||||
"date_creat" datetime, -- creation date
|
"date_creat" timestamp, -- creation date
|
||||||
"date_valid" datetime, -- creation date
|
"date_valid" timestamp, -- creation date
|
||||||
"date_appro" datetime, -- creation date
|
"date_appro" timestamp, -- creation date
|
||||||
"fk_user_creat" integer, -- utilisateur qui a créé l'info
|
"fk_user_creat" integer, -- utilisateur qui a créé l'info
|
||||||
"fk_user_valid" integer, -- utilisateur qui a créé l'info
|
"fk_user_valid" integer, -- utilisateur qui a créé l'info
|
||||||
"fk_user_appro" integer -- utilisateur qui a créé l'info
|
"fk_user_appro" integer -- utilisateur qui a créé l'info
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
create table llx_newsletter
|
create table llx_newsletter
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"email_subject" varchar(32) NOT NULL,
|
"email_subject" varchar(32) NOT NULL,
|
||||||
"email_from_name" varchar(255) NOT NULL,
|
"email_from_name" varchar(255) NOT NULL,
|
||||||
@ -37,9 +37,9 @@ create table llx_newsletter
|
|||||||
"target" smallint,
|
"target" smallint,
|
||||||
"sql_target" text,
|
"sql_target" text,
|
||||||
"status" smallint DEFAULT 0 NOT NULL,
|
"status" smallint DEFAULT 0 NOT NULL,
|
||||||
"date_send_request" datetime, -- debut de l'envoi demandé
|
"date_send_request" timestamp, -- debut de l'envoi demandé
|
||||||
"date_send_begin" datetime, -- debut de l'envoi
|
"date_send_begin" timestamp, -- debut de l'envoi
|
||||||
"date_send_end" datetime, -- fin de l'envoi
|
"date_send_end" timestamp, -- fin de l'envoi
|
||||||
"nbsent" integer, -- nombre de mails envoyés
|
"nbsent" integer, -- nombre de mails envoyés
|
||||||
"nberror" integer, -- nombre de mails envoyés
|
"nberror" integer, -- nombre de mails envoyés
|
||||||
"fk_user_author" integer,
|
"fk_user_author" integer,
|
||||||
|
|||||||
@ -28,7 +28,7 @@ create table llx_notify
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"daten" datetime, -- date de la notification
|
"daten" timestamp, -- date de la notification
|
||||||
"fk_action" integer NOT NULL,
|
"fk_action" integer NOT NULL,
|
||||||
"fk_contact" integer NOT NULL,
|
"fk_contact" integer NOT NULL,
|
||||||
"objet_type" varchar(10) CHECK (objet_type IN ('ficheinter','facture','propale')) ,
|
"objet_type" varchar(10) CHECK (objet_type IN ('ficheinter','facture','propale')) ,
|
||||||
|
|||||||
@ -33,9 +33,9 @@ create table llx_paiement
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_facture" integer,
|
"fk_facture" integer,
|
||||||
"datec" datetime, -- date de creation
|
"datec" timestamp, -- date de creation
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"datep" datetime, -- payment date
|
"datep" timestamp, -- payment date
|
||||||
"amount" real DEFAULT 0,
|
"amount" real DEFAULT 0,
|
||||||
"author" varchar(50),
|
"author" varchar(50),
|
||||||
"fk_paiement" integer NOT NULL,
|
"fk_paiement" integer NOT NULL,
|
||||||
|
|||||||
@ -28,9 +28,9 @@ create table llx_paiementcharge
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_charge" integer,
|
"fk_charge" integer,
|
||||||
"datec" datetime, -- date de creation
|
"datec" timestamp, -- date de creation
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"datep" datetime, -- payment date
|
"datep" timestamp, -- payment date
|
||||||
"amount" real DEFAULT 0,
|
"amount" real DEFAULT 0,
|
||||||
"fk_typepaiement" integer NOT NULL,
|
"fk_typepaiement" integer NOT NULL,
|
||||||
"num_paiement" varchar(50),
|
"num_paiement" varchar(50),
|
||||||
|
|||||||
@ -28,9 +28,9 @@ create table llx_paiementfourn
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"datec" datetime, -- date de creation de l'enregistrement
|
"datec" timestamp, -- date de creation de l'enregistrement
|
||||||
"fk_facture_fourn" integer, -- facture
|
"fk_facture_fourn" integer, -- facture
|
||||||
"datep" datetime, -- date de paiement
|
"datep" timestamp, -- date de paiement
|
||||||
"amount" real DEFAULT 0, -- montant
|
"amount" real DEFAULT 0, -- montant
|
||||||
"fk_user_author" integer, -- auteur
|
"fk_user_author" integer, -- auteur
|
||||||
"fk_paiement" integer NOT NULL, -- moyen de paiement
|
"fk_paiement" integer NOT NULL, -- moyen de paiement
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
create table llx_pointmort
|
create table llx_pointmort
|
||||||
(
|
(
|
||||||
"month" datetime,
|
"month" timestamp,
|
||||||
"amount" real
|
"amount" real
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -29,14 +29,15 @@ create table llx_prelevement
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"ref" varchar(12), -- reference
|
"ref" varchar(12), -- reference
|
||||||
"datec" datetime, -- date de creation
|
"datec" timestamp, -- date de creation
|
||||||
"amount" real DEFAULT 0, -- montant total du prelevement
|
"amount" real DEFAULT 0, -- montant total du prelevement
|
||||||
"credite" smallint DEFAULT 0, -- indique si le prelevement a été credité
|
"credite" smallint DEFAULT 0, -- indique si le prelevement a été credité
|
||||||
"note" text,
|
"note" text,
|
||||||
"date_trans" datetime,
|
"date_trans" timestamp,
|
||||||
"method_trans" smallint,
|
"method_trans" smallint,
|
||||||
"fk_user_trans" integer,
|
"fk_user_trans" integer,
|
||||||
"date_credit" datetime,
|
"date_credit" timestamp,
|
||||||
"fk_user_credit" integer,
|
"fk_user_credit" integer,
|
||||||
|
|
||||||
|
"UNIQUE"(ref)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -32,15 +32,16 @@ create table llx_prelevement_bons
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"ref" varchar(12), -- reference
|
"ref" varchar(12), -- reference
|
||||||
"datec" datetime, -- date de creation
|
"datec" timestamp, -- date de creation
|
||||||
"amount" real DEFAULT 0, -- montant total du prélèvement
|
"amount" real DEFAULT 0, -- montant total du prélèvement
|
||||||
"statut" smallint DEFAULT 0, -- statut
|
"statut" smallint DEFAULT 0, -- statut
|
||||||
"credite" smallint DEFAULT 0, -- indique si le prelevement a été credité
|
"credite" smallint DEFAULT 0, -- indique si le prelevement a été credité
|
||||||
"note" text,
|
"note" text,
|
||||||
"date_trans" datetime, -- date de transmission à la banque
|
"date_trans" timestamp, -- date de transmission à la banque
|
||||||
"method_trans" smallint, -- méthode de transmission
|
"method_trans" smallint, -- méthode de transmission
|
||||||
"fk_user_trans" integer, -- user qui a effectué la transmission
|
"fk_user_trans" integer, -- user qui a effectué la transmission
|
||||||
"date_credit" datetime, -- date de crédit sur le compte
|
"date_credit" timestamp, -- date de crédit sur le compte
|
||||||
"fk_user_credit" integer, -- user qui a remonté l'info de crédit
|
"fk_user_credit" integer, -- user qui a remonté l'info de crédit
|
||||||
|
|
||||||
|
"UNIQUE"(ref)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -25,10 +25,10 @@
|
|||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
|
||||||
|
|
||||||
create table llx_prelevement_facture
|
create table llx_prelevement_facture
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_facture" integer NOT NULL,
|
"fk_facture" integer NOT NULL,
|
||||||
"fk_prelevement" integer NOT NULL,
|
"fk_prelevement_lignes" integer NOT NULL
|
||||||
"statut" smallint DEFAULT 0
|
|
||||||
);
|
);
|
||||||
|
|||||||
@ -30,15 +30,15 @@
|
|||||||
create table llx_prelevement_facture_demande
|
create table llx_prelevement_facture_demande
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_facture" integer NOT NULL,
|
"fk_facture" integer NOT NULL,
|
||||||
"amount" real NOT NULL,
|
"amount" real NOT NULL,
|
||||||
"date_demande" datetime,
|
"date_demande" timestamp,
|
||||||
"traite" smallint DEFAULT 0,
|
"traite" smallint DEFAULT 0,
|
||||||
"date_traite" datetime,
|
"date_traite" timestamp,
|
||||||
"fk_prelevement" integer,
|
"fk_prelevement_bons" integer,
|
||||||
"fk_user_demande" integer NOT NULL,
|
"fk_user_demande" integer NOT NULL,
|
||||||
"code_banque" varchar(7),
|
"code_banque" varchar(7),
|
||||||
"code_guichet" varchar(6),
|
"code_guichet" varchar(6),
|
||||||
"number" varchar(255),
|
"number" varchar(255),
|
||||||
"cle_rib" varchar(5)
|
"cle_rib" varchar(5)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -29,11 +29,9 @@
|
|||||||
create table llx_prelevement_rejet
|
create table llx_prelevement_rejet
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_soc" integer NOT NULL,
|
"fk_prelevement_lignes" integer,
|
||||||
"fk_prelevement" integer,
|
"motif" integer,
|
||||||
"amount" real DEFAULT 0, -- montant total du prelevement
|
"date_creation" timestamp,
|
||||||
"motif" integer,
|
"fk_user_creation" integer,
|
||||||
"note" text,
|
"note" text
|
||||||
"date_creation" datetime,
|
|
||||||
"fk_user_creation" integer
|
|
||||||
);
|
);
|
||||||
|
|||||||
@ -28,14 +28,15 @@
|
|||||||
create table llx_product
|
create table llx_product
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
|
"ref" varchar(15) UNIQUE,
|
||||||
"label" varchar(255),
|
"label" varchar(255),
|
||||||
"description" text,
|
"description" text,
|
||||||
"price" double,
|
"price" double,
|
||||||
"tva_tx" double DEFAULT 19.6,
|
"tva_tx" double DEFAULT 19.6,
|
||||||
"fk_user_author" integer,
|
"fk_user_author" integer,
|
||||||
"envente" tinyint DEFAULT 1,
|
"envente" smallint DEFAULT 1,
|
||||||
"nbvente" integer DEFAULT 0,
|
"nbvente" integer DEFAULT 0,
|
||||||
"fk_product_type" integer DEFAULT 0,
|
"fk_product_type" integer DEFAULT 0,
|
||||||
"duration" varchar(6),
|
"duration" varchar(6),
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
create table llx_product_fournisseur
|
create table llx_product_fournisseur
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"fk_product" integer,
|
"fk_product" integer,
|
||||||
"fk_soc" integer,
|
"fk_soc" integer,
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
create table llx_product_fournisseur_price
|
create table llx_product_fournisseur_price
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"fk_product" integer,
|
"fk_product" integer,
|
||||||
"fk_soc" integer, -- lien sur llx_societe
|
"fk_soc" integer, -- lien sur llx_societe
|
||||||
|
|||||||
@ -29,10 +29,10 @@ create table llx_product_price
|
|||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"fk_product" integer NOT NULL,
|
"fk_product" integer NOT NULL,
|
||||||
"date_price" datetime,
|
"date_price" timestamp,
|
||||||
"price" double,
|
"price" double,
|
||||||
"tva_tx" double DEFAULT 19.6,
|
"tva_tx" double DEFAULT 19.6,
|
||||||
"fk_user_author" integer,
|
"fk_user_author" integer,
|
||||||
"envente" tinyint DEFAULT 1
|
"envente" smallint DEFAULT 1
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -37,5 +37,6 @@ create table llx_projet
|
|||||||
"title" varchar(255),
|
"title" varchar(255),
|
||||||
"fk_user_resp" integer, -- responsable du projet
|
"fk_user_resp" integer, -- responsable du projet
|
||||||
"fk_user_creat" integer, -- createur du projet
|
"fk_user_creat" integer, -- createur du projet
|
||||||
"note" text
|
"note" text,
|
||||||
|
"UNIQUE" INDEX(ref)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -31,10 +31,10 @@ create table llx_propal
|
|||||||
"fk_soc_contact" integer,
|
"fk_soc_contact" integer,
|
||||||
"fk_projet" integer DEFAULT 0, -- projet auquel est rattache la propale
|
"fk_projet" integer DEFAULT 0, -- projet auquel est rattache la propale
|
||||||
"ref" varchar(30) NOT NULL, -- propal number
|
"ref" varchar(30) NOT NULL, -- propal number
|
||||||
"datec" datetime, -- date de creation
|
"datec" timestamp, -- date de creation
|
||||||
"fin_validite" datetime, -- date de fin de validite
|
"fin_validite" timestamp, -- date de fin de validite
|
||||||
"date_valid" datetime, -- date de validation
|
"date_valid" timestamp, -- date de validation
|
||||||
"date_cloture" datetime, -- date de cloture
|
"date_cloture" timestamp, -- date de cloture
|
||||||
"datep" date, -- date de la propal
|
"datep" date, -- date de la propal
|
||||||
"fk_user_author" integer, -- createur de la propale
|
"fk_user_author" integer, -- createur de la propale
|
||||||
"fk_user_valid" integer, -- valideur de la propale
|
"fk_user_valid" integer, -- valideur de la propale
|
||||||
@ -47,4 +47,5 @@ create table llx_propal
|
|||||||
"total" real DEFAULT 0,
|
"total" real DEFAULT 0,
|
||||||
"note" text,
|
"note" text,
|
||||||
"model_pdf" varchar(50),
|
"model_pdf" varchar(50),
|
||||||
4294967294);
|
"UNIQUE" INDEX (ref)
|
||||||
|
);
|
||||||
|
|||||||
@ -32,6 +32,6 @@ create table llx_rights_def
|
|||||||
"perms" varchar(50),
|
"perms" varchar(50),
|
||||||
"subperms" varchar(50),
|
"subperms" varchar(50),
|
||||||
"type" varchar(1) CHECK (type IN ('r','w','m','d','a')) ,
|
"type" varchar(1) CHECK (type IN ('r','w','m','d','a')) ,
|
||||||
"bydefault" tinyint DEFAULT 0
|
"bydefault" smallint DEFAULT 0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -31,5 +31,6 @@ create table llx_so_gr
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_soc" integer,
|
"fk_soc" integer,
|
||||||
"fk_groupe" integer
|
"fk_groupe" integer,
|
||||||
|
"UNIQUE"(fk_soc, fk_groupe)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -28,8 +28,8 @@ create table llx_soc_events
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY, -- public id
|
rowid SERIAL PRIMARY KEY, -- public id
|
||||||
"fk_soc" int NOT NULL, --
|
"fk_soc" int NOT NULL, --
|
||||||
"dateb" datetime NOT NULL, -- begin date
|
"dateb" timestamp NOT NULL, -- begin date
|
||||||
"datee" datetime NOT NULL, -- end date
|
"datee" timestamp NOT NULL, -- end date
|
||||||
"title" varchar(100) NOT NULL,
|
"title" varchar(100) NOT NULL,
|
||||||
"url" varchar(255),
|
"url" varchar(255),
|
||||||
"description" text
|
"description" text
|
||||||
|
|||||||
@ -30,6 +30,6 @@ create table llx_soc_recontact
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_soc" integer,
|
"fk_soc" integer,
|
||||||
"datere" datetime,
|
"datere" timestamp,
|
||||||
"author" varchar(15)
|
"author" varchar(15)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -32,8 +32,8 @@ create table llx_societe
|
|||||||
"active" smallint DEFAULT 0, --
|
"active" smallint DEFAULT 0, --
|
||||||
"parent" integer DEFAULT 0, --
|
"parent" integer DEFAULT 0, --
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"datec" datetime, -- creation date
|
"datec" timestamp, -- creation date
|
||||||
"datea" datetime, -- activation date
|
"datea" timestamp, -- activation date
|
||||||
"nom" varchar(60), -- company name
|
"nom" varchar(60), -- company name
|
||||||
"code_client" varchar(15), -- code client
|
"code_client" varchar(15), -- code client
|
||||||
"code_compta" varchar(15), -- code compta
|
"code_compta" varchar(15), -- code compta
|
||||||
@ -65,5 +65,6 @@ create table llx_societe
|
|||||||
"fk_user_creat" integer, -- utilisateur qui a créé l'info
|
"fk_user_creat" integer, -- utilisateur qui a créé l'info
|
||||||
"fk_user_modif" integer, -- utilisateur qui a modifié l'info
|
"fk_user_modif" integer, -- utilisateur qui a modifié l'info
|
||||||
"remise_client" real DEFAULT 0, -- remise systématique pour le client
|
"remise_client" real DEFAULT 0, -- remise systématique pour le client
|
||||||
|
"UNIQUE" INDEX(prefix_comm)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,7 @@ create table llx_societe_commerciaux
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_soc" integer,
|
"fk_soc" integer,
|
||||||
"fk_user" integer
|
"fk_user" integer,
|
||||||
|
"UNIQUE" INDEX(fk_soc, fk_user)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ create table llx_societe_remise
|
|||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_soc" integer NOT NULL,
|
"fk_soc" integer NOT NULL,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"datec" datetime, -- creation date
|
"datec" timestamp, -- creation date
|
||||||
"fk_user_author" integer, -- utilisateur qui a créé l'info
|
"fk_user_author" integer, -- utilisateur qui a créé l'info
|
||||||
"remise_client" real DEFAULT 0, -- remise systématique pour le client
|
"remise_client" real DEFAULT 0, -- remise systématique pour le client
|
||||||
"note" text
|
"note" text
|
||||||
|
|||||||
@ -32,7 +32,7 @@ create table llx_societe_remise_except
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_soc" integer NOT NULL, -- client
|
"fk_soc" integer NOT NULL, -- client
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"amount_ht" real NOT NULL,
|
"amount_ht" real NOT NULL,
|
||||||
"fk_user" integer NOT NULL,
|
"fk_user" integer NOT NULL,
|
||||||
"fk_facture" integer,
|
"fk_facture" integer,
|
||||||
|
|||||||
@ -32,7 +32,7 @@ create table llx_societe_rib
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_soc" integer NOT NULL,
|
"fk_soc" integer NOT NULL,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"label" varchar(30),
|
"label" varchar(30),
|
||||||
"bank" varchar(255),
|
"bank" varchar(255),
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
create table llx_socpeople
|
create table llx_socpeople
|
||||||
(
|
(
|
||||||
idp SERIAL PRIMARY KEY,
|
idp SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"fk_soc" integer, -- lien vers la societe
|
"fk_soc" integer, -- lien vers la societe
|
||||||
"civilite" varchar(6),
|
"civilite" varchar(6),
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
create table llx_socstatutlog
|
create table llx_socstatutlog
|
||||||
(
|
(
|
||||||
id SERIAL PRIMARY KEY,
|
id SERIAL PRIMARY KEY,
|
||||||
"datel" datetime,
|
"datel" timestamp,
|
||||||
"fk_soc" integer,
|
"fk_soc" integer,
|
||||||
"fk_statut" integer,
|
"fk_statut" integer,
|
||||||
"author" varchar(30)
|
"author" varchar(30)
|
||||||
|
|||||||
@ -29,7 +29,7 @@ create table llx_stock_mouvement
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"datem" datetime,
|
"datem" timestamp,
|
||||||
"fk_product" integer NOT NULL,
|
"fk_product" integer NOT NULL,
|
||||||
"fk_entrepot" integer NOT NULL,
|
"fk_entrepot" integer NOT NULL,
|
||||||
"value" integer,
|
"value" integer,
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
create table llx_todocomm
|
create table llx_todocomm
|
||||||
(
|
(
|
||||||
id SERIAL PRIMARY KEY,
|
id SERIAL PRIMARY KEY,
|
||||||
"datea" datetime, -- date de l'action
|
"datea" timestamp, -- date de l'action
|
||||||
"label" varchar(50), -- libelle de l'action
|
"label" varchar(50), -- libelle de l'action
|
||||||
"fk_user_action" integer, -- id de la personne qui doit effectuer l'action
|
"fk_user_action" integer, -- id de la personne qui doit effectuer l'action
|
||||||
"fk_user_author" integer, -- id auteur de l'action
|
"fk_user_author" integer, -- id auteur de l'action
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
create table llx_user
|
create table llx_user
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"login" varchar(8),
|
"login" varchar(8),
|
||||||
"pass" varchar(32),
|
"pass" varchar(32),
|
||||||
@ -42,5 +42,6 @@ create table llx_user
|
|||||||
"module_compta" smallint DEFAULT 1,
|
"module_compta" smallint DEFAULT 1,
|
||||||
"fk_societe" integer DEFAULT 0,
|
"fk_societe" integer DEFAULT 0,
|
||||||
"fk_socpeople" integer DEFAULT 0,
|
"fk_socpeople" integer DEFAULT 0,
|
||||||
"note" text
|
"note" text,
|
||||||
|
"UNIQUE" INDEX(login)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -31,5 +31,6 @@ create table llx_user_param
|
|||||||
"fk_user" integer,
|
"fk_user" integer,
|
||||||
"page" varchar(255),
|
"page" varchar(255),
|
||||||
"param" varchar(64),
|
"param" varchar(64),
|
||||||
"value" varchar(255)
|
"value" varchar(255),
|
||||||
|
"UNIQUE" (fk_user,page,param)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -29,6 +29,7 @@ create table llx_user_rights
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_user" integer NOT NULL,
|
"fk_user" integer NOT NULL,
|
||||||
"fk_id" integer NOT NULL
|
"fk_id" integer NOT NULL,
|
||||||
|
"UNIQUE"(fk_user,fk_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,8 @@
|
|||||||
create table llx_usergroup
|
create table llx_usergroup
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
|
"nom" varchar(255) NOT NULL UNIQUE,
|
||||||
"note" text
|
"note" text
|
||||||
);
|
);
|
||||||
|
|||||||
@ -29,6 +29,7 @@ create table llx_usergroup_rights
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_usergroup" integer NOT NULL,
|
"fk_usergroup" integer NOT NULL,
|
||||||
"fk_id" integer NOT NULL
|
"fk_id" integer NOT NULL,
|
||||||
|
"UNIQUE"(fk_usergroup,fk_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -29,5 +29,6 @@ create table llx_usergroup_user
|
|||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_user" integer NOT NULL,
|
"fk_user" integer NOT NULL,
|
||||||
"fk_usergroup" integer NOT NULL
|
"fk_usergroup" integer NOT NULL,
|
||||||
|
"UNIQUE"(fk_user,fk_usergroup)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -29,8 +29,8 @@ create table llx_ventes
|
|||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_soc" integer NOT NULL,
|
"fk_soc" integer NOT NULL,
|
||||||
"fk_product" integer NOT NULL,
|
"fk_product" integer NOT NULL,
|
||||||
"dated" datetime, -- date debut
|
"dated" timestamp, -- date debut
|
||||||
"datef" datetime, -- date fin
|
"datef" timestamp, -- date fin
|
||||||
"price" real,
|
"price" real,
|
||||||
"author" varchar(30),
|
"author" varchar(30),
|
||||||
"active" smallint DEFAULT 0 NOT NULL,
|
"active" smallint DEFAULT 0 NOT NULL,
|
||||||
|
|||||||
@ -33,10 +33,10 @@
|
|||||||
create table llx_voyage
|
create table llx_voyage
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"dateo" date, -- date operation
|
"dateo" date, -- date operation
|
||||||
"date_depart" datetime, -- date du voyage
|
"date_depart" timestamp, -- date du voyage
|
||||||
"date_arrivee" datetime, -- date du voyage
|
"date_arrivee" timestamp, -- date du voyage
|
||||||
"amount" real NOT NULL DEFAULT 0, -- prix du billet
|
"amount" real NOT NULL DEFAULT 0, -- prix du billet
|
||||||
"reduction" real NOT NULL DEFAULT 0, -- montant de la reduction obtenue
|
"reduction" real NOT NULL DEFAULT 0, -- montant de la reduction obtenue
|
||||||
"depart" varchar(255),
|
"depart" varchar(255),
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
create table llx_voyage_reduc
|
create table llx_voyage_reduc
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" datetime,
|
"datec" timestamp,
|
||||||
"datev" date, -- date de valeur
|
"datev" date, -- date de valeur
|
||||||
"date_debut" date, -- date operation
|
"date_debut" date, -- date operation
|
||||||
"date_fin" date,
|
"date_fin" date,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user