2
0
forked from Wavyzz/dolibarr

nouvelle version des tables posgtresql

beautification du code, tout les parametres en MAJUSCULES
This commit is contained in:
opensides
2004-10-09 00:06:52 +00:00
parent c293b0b737
commit 595958d1e8
30 changed files with 69 additions and 69 deletions

View File

@@ -25,7 +25,7 @@
create table llx_actioncomm create table llx_actioncomm
( (
id integer AUTO_INCREMENT PRIMARY KEY, id integer AUTO_INCREMENT PRIMARY KEY,
datea datetime, -- action date datea timestamp without time zone, -- action date
fk_action integer, fk_action integer,
label varchar(50), -- libelle de l'action label varchar(50), -- libelle de l'action
fk_soc integer, fk_soc integer,

View File

@@ -25,9 +25,9 @@ create table llx_album
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
osc_id integer NOT NULL, osc_id integer NOT NULL,
tms timestamp, tms timestamp,
ref varchar(12), ref varchar(12),
title varchar(64), title varchar(64),
annee smallint(64), annee smallint(64),
description text, description text,
collectif tinyint, collectif tinyint,
fk_user_author integer fk_user_author integer

View File

@@ -25,6 +25,6 @@ create table llx_auteur
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
oscid integer NOT NULL, oscid integer NOT NULL,
tms timestamp, tms timestamp,
nom varchar(255), nom varchar(255),
fk_user_author integer fk_user_author integer
)type=innodb; )type=innodb;

View File

@@ -41,7 +41,7 @@ create table llx_bank_account
domiciliation varchar(255), domiciliation varchar(255),
proprio varchar(60), proprio varchar(60),
adresse_proprio varchar(255), adresse_proprio varchar(255),
courant smallint default 0 not null, courant smallint DEFAULT 0 NOT NULL,
clos smallint default 0 not null, clos smallint DEFAULT 0 NOT NULL,
account_number varchar(8) account_number varchar(8)
)type=innodb; )type=innodb;

View File

@@ -20,8 +20,8 @@
create table llx_bank_class create table llx_bank_class
( (
lineid integer not null, lineid integer NOT NULL,
fk_categ integer not null, fk_categ integer NOT NULL,
INDEX(lineid) INDEX(lineid)
)type=innodb; )type=innodb;

View File

@@ -24,9 +24,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, 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 tinyint DEFAULT 1 NOT NULL,
todo tinyint todo tinyint
)type=innodb; )type=innodb;

View File

@@ -26,6 +26,6 @@ create table llx_c_ape
rowid integer AUTO_INCREMENT UNIQUE, rowid integer AUTO_INCREMENT UNIQUE,
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 tinyint DEFAULT 1 NOT NULL
)type=innodb; )type=innodb;

View File

@@ -25,8 +25,8 @@ create table llx_c_chargesociales
( (
id integer PRIMARY KEY, id integer PRIMARY KEY,
libelle varchar(80), libelle varchar(80),
deductible smallint NOT NULL default 0, deductible smallint NOT NULL DEFAULT 0,
active tinyint default 1 NOT NULL active tinyint DEFAULT 1 NOT NULL
)type=innodb; )type=innodb;

View File

@@ -25,6 +25,6 @@ create table llx_c_civilite
rowid integer PRIMARY KEY, rowid integer PRIMARY KEY,
code varchar(6) UNIQUE NOT NULL, code varchar(6) UNIQUE NOT NULL,
civilite varchar(50), civilite varchar(50),
active tinyint default 1 NOT NULL active tinyint DEFAULT 1 NOT NULL
)type=innodb; )type=innodb;

View File

@@ -23,14 +23,14 @@
create table llx_c_departements create table llx_c_departements
( (
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
code_departement varchar(6) NOT NULL, code_departement varchar(6) NOT NULL,
fk_region integer, fk_region integer,
cheflieu varchar(7), cheflieu varchar(7),
tncc integer, tncc integer,
ncc varchar(50), ncc varchar(50),
nom varchar(50), nom varchar(50),
active tinyint default 1 NOT NULL, active tinyint DEFAULT 1 NOT NULL,
key (fk_region) key (fk_region)
)type=innodb; )type=innodb;

View File

@@ -24,8 +24,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, code varchar(12) UNIQUE NOT NULL,
libelle varchar(30), libelle varchar(30),
active tinyint default 1 NOT NULL active tinyint DEFAULT 1 NOT NULL
)type=innodb; )type=innodb;

View File

@@ -30,7 +30,7 @@ create table llx_cash_account
datec datetime, datec datetime,
tms timestamp, tms timestamp,
label varchar(30), label varchar(30),
courant smallint default 0 not null, courant smallint DEFAULT 0 NOT NULL,
clos smallint default 0 not null, clos smallint DEFAULT 0 NOT NULL,
account_number varchar(8) account_number varchar(8)
)type=innodb; )type=innodb;

View File

@@ -26,7 +26,7 @@
create table llx_actioncomm create table llx_actioncomm
( (
id SERIAL PRIMARY KEY, id SERIAL PRIMARY KEY,
datea timestamp, -- action date datea timestamp without time zone, -- action date
fk_action integer, fk_action integer,
label varchar(50), -- libelle de l'action label varchar(50), -- libelle de l'action
fk_soc integer, fk_soc integer,

View File

@@ -32,8 +32,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 CHAR(3) CHECK (morphy IN ('mor','phy')) NOT NULL, -- personne morale / personne physique morphy CHAR(3) CHECK (morphy IN ('mor','phy')) NOT NULL, -- personne morale / personne physique
datevalid timestamp, -- date de validation datevalid timestamp without time zone, -- date de validation
datec timestamp, -- date de creation datec timestamp without time zone, -- date de creation
prenom varchar(50), prenom varchar(50),
nom varchar(50), nom varchar(50),
societe varchar(50), societe varchar(50),
@@ -49,7 +49,7 @@ 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 timestamp NOT NULL, -- date de fin de validit<69> de la cotisation datefin timestamp without time zone NOT NULL, -- date de fin de validit<69> de la cotisation
note text note text
); );

View File

@@ -24,7 +24,7 @@
create table llx_appro create table llx_appro
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
datec timestamp, datec timestamp without time zone,
tms timestamp, tms timestamp,
fk_product integer NOT NULL, fk_product integer NOT NULL,
quantity smallint NOT NULL, quantity smallint NOT NULL,

View File

@@ -26,6 +26,6 @@ create table llx_auteur
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
oscid integer NOT NULL, oscid integer NOT NULL,
tms timestamp, tms timestamp,
nom varchar(255), nom varchar(255),
fk_user_author integer fk_user_author integer
); );

View File

@@ -26,7 +26,7 @@
create table llx_bank create table llx_bank
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
datec timestamp, datec timestamp without time zone,
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,
@@ -43,4 +43,3 @@ create table llx_bank
author varchar(40) -- a supprimer apres migration author varchar(40) -- a supprimer apres migration
); );

View File

@@ -26,20 +26,20 @@
create table llx_bank_account create table llx_bank_account
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
datec timestamp, datec timestamp without time zone,
tms timestamp, tms timestamp,
label varchar(30), label varchar(30),
bank varchar(255), bank varchar(60),
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),
bic varchar(10), bic varchar(10),
iban_prefix varchar(5), iban_prefix varchar(5),
domiciliation varchar(50), domiciliation varchar(255),
proprio varchar(60), proprio varchar(60),
adresse_proprio varchar(255), adresse_proprio varchar(255),
courant smallint default 0 not null, courant smallint DEFAULT 0 NOT NULL,
clos smallint default 0 not null, clos smallint DEFAULT 0 NOT NULL,
account_number varchar(8) account_number varchar(8)
); );

View File

@@ -22,8 +22,8 @@
create table llx_bank_class create table llx_bank_class
( (
lineid SERIAL, lineid integer NOT NULL,
fk_categ integer not null fk_categ integer NOT NULL
); );
create index llx_bank_class_lineid on llx_bank_class(lineid); create index llx_bank_class_lineid on llx_bank_class(lineid);

View File

@@ -26,5 +26,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 timestamp dateb timestamp without time zone
); );

View File

@@ -25,5 +25,5 @@ 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,
); );

View File

@@ -27,6 +27,7 @@ create table llx_c_accountingsystem
fk_pays integer NOT NULL, fk_pays integer NOT NULL,
pcg_version varchar(12) NOT NULL, pcg_version varchar(12) NOT NULL,
pcg_type varchar(20) NOT NULL, pcg_type varchar(20) NOT NULL,
pcg_subtype varchar(20) NOT NULL,
label varchar(128) NOT NULL, label varchar(128) NOT NULL,
account_number varchar(20) NOT NULL account_number varchar(20) NOT NULL
); );

View File

@@ -25,10 +25,10 @@
create table llx_c_actioncomm create table llx_c_actioncomm
( (
id SERIAL PRIMARY KEY, id SERIAL PRIMARY KEY,
code varchar(12) unique not null, 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 smallint default 1 not null, active smallint DEFAULT 1 NOT NULL,
todo smallint todo smallint
); );

View File

@@ -26,6 +26,6 @@ create table llx_c_ape
rowid serial UNIQUE, rowid serial UNIQUE,
code_ape varchar(5) PRIMARY KEY, code_ape varchar(5) PRIMARY KEY,
libelle varchar(255), libelle varchar(255),
active smallint default 1 not null active smallint DEFAULT 1 NOT NULL
); );

View File

@@ -25,8 +25,8 @@ create table llx_c_chargesociales
( (
id SERIAL PRIMARY KEY, id SERIAL PRIMARY KEY,
libelle varchar(80), libelle varchar(80),
deductible integer NOT NULL default 0, deductible integer DEFAULT 0 NOT NULL,
active integer default 1 NOT NULL active integer DEFAULT 1 NOT NULL
); );

View File

@@ -22,8 +22,8 @@
create table llx_c_civilite create table llx_c_civilite
( (
rowid serial PRIMARY KEY, rowid serial PRIMARY KEY,
code varchar(6) unique not null, code varchar(6) UNIQUE NOT NULL,
civilite varchar(50), civilite varchar(50),
active smallint default 1 active smallint DEFAULT 1 NOT NULL
); );

View File

@@ -23,14 +23,14 @@
create table llx_c_departements create table llx_c_departements
( (
rowid serial PRIMARY KEY, rowid serial PRIMARY KEY,
code_departement varchar(6) not null, code_departement varchar(6) NOT NULL,
fk_region integer, fk_region integer,
cheflieu varchar(7), cheflieu varchar(7),
tncc integer, tncc integer,
ncc varchar(50), ncc varchar(50),
nom varchar(50), nom varchar(50),
active smallint default 1 not null active smallint DEFAULT 1 NOT NULL
); );
CREATE INDEX llx_c_departements_fk_region ON llx_c_departements(fk_region); CREATE INDEX llx_c_departements_fk_region ON llx_c_departements(fk_region);

View File

@@ -1 +1 @@
-- ======================================================================== -- ========================================================================

View File

@@ -24,11 +24,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, 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 smallint default 1 not null active smallint DEFAULT 1 NOT NULL
); );

View File

@@ -28,10 +28,10 @@
create table llx_cash_account create table llx_cash_account
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
datec timestamp, datec timestamp without time zone,
tms timestamp, tms timestamp,
label varchar(30), label varchar(30),
courant smallint default 0 not null, courant smallint DEFAULT 0 NOT NULL,
clos smallint default 0 not null, clos smallint DEFAULT 0 NOT NULL,
account_number varchar(8) account_number varchar(8)
); );