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
(
id integer AUTO_INCREMENT PRIMARY KEY,
datea datetime, -- action date
datea timestamp without time zone, -- action date
fk_action integer,
label varchar(50), -- libelle de l'action
fk_soc integer,

View File

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

View File

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

View File

@@ -25,8 +25,8 @@ create table llx_c_actioncomm
(
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,
active tinyint default 1 NOT NULL,
active tinyint DEFAULT 1 NOT NULL,
todo tinyint
)type=innodb;

View File

@@ -26,6 +26,6 @@ create table llx_c_ape
rowid integer AUTO_INCREMENT UNIQUE,
code_ape varchar(5) PRIMARY KEY,
libelle varchar(255),
active tinyint default 1 NOT NULL
active tinyint DEFAULT 1 NOT NULL
)type=innodb;

View File

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

View File

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

View File

@@ -30,7 +30,7 @@ create table llx_c_departements
tncc integer,
ncc varchar(50),
nom varchar(50),
active tinyint default 1 NOT NULL,
active tinyint DEFAULT 1 NOT NULL,
key (fk_region)
)type=innodb;

View File

@@ -26,6 +26,6 @@ create table llx_c_effectif
id integer PRIMARY KEY,
code varchar(12) UNIQUE NOT NULL,
libelle varchar(30),
active tinyint default 1 NOT NULL
active tinyint DEFAULT 1 NOT NULL
)type=innodb;

View File

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

View File

@@ -26,7 +26,7 @@
create table llx_actioncomm
(
id SERIAL PRIMARY KEY,
datea timestamp, -- action date
datea timestamp without time zone, -- action date
fk_action integer,
label varchar(50), -- libelle de l'action
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 ?
fk_adherent_type smallint,
morphy CHAR(3) CHECK (morphy IN ('mor','phy')) NOT NULL, -- personne morale / personne physique
datevalid timestamp, -- date de validation
datec timestamp, -- date de creation
datevalid timestamp without time zone, -- date de validation
datec timestamp without time zone, -- date de creation
prenom varchar(50),
nom varchar(50),
societe varchar(50),
@@ -49,7 +49,7 @@ create table llx_adherent
fk_user_author integer NOT NULL,
fk_user_mod 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
);

View File

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

View File

@@ -26,7 +26,7 @@
create table llx_bank
(
rowid SERIAL PRIMARY KEY,
datec timestamp,
datec timestamp without time zone,
datev date, -- date de valeur
dateo date, -- date operation
amount real NOT NULL default 0,
@@ -43,4 +43,3 @@ create table llx_bank
author varchar(40) -- a supprimer apres migration
);

View File

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

View File

@@ -22,8 +22,8 @@
create table llx_bank_class
(
lineid SERIAL,
fk_categ integer not null
lineid integer NOT NULL,
fk_categ integer NOT NULL
);
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,
fk_soc 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,
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,
pcg_version varchar(12) NOT NULL,
pcg_type varchar(20) NOT NULL,
pcg_subtype varchar(20) NOT NULL,
label varchar(128) NOT NULL,
account_number varchar(20) NOT NULL
);

View File

@@ -25,10 +25,10 @@
create table llx_c_actioncomm
(
id SERIAL PRIMARY KEY,
code varchar(12) unique not null,
type varchar(10) default 'system' not null,
libelle varchar(30) not null,
active smallint default 1 not null,
code varchar(12) UNIQUE NOT NULL,
type varchar(10) DEFAULT 'system' NOT NULL,
libelle varchar(30) NOT NULL,
active smallint DEFAULT 1 NOT NULL,
todo smallint
);

View File

@@ -26,6 +26,6 @@ create table llx_c_ape
rowid serial UNIQUE,
code_ape varchar(5) PRIMARY KEY,
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,
libelle varchar(80),
deductible integer NOT NULL default 0,
active integer default 1 NOT NULL
deductible integer DEFAULT 0 NOT NULL,
active integer DEFAULT 1 NOT NULL
);

View File

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

View File

@@ -24,13 +24,13 @@
create table llx_c_departements
(
rowid serial PRIMARY KEY,
code_departement varchar(6) not null,
code_departement varchar(6) NOT NULL,
fk_region integer,
cheflieu varchar(7),
tncc integer,
ncc 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);

View File

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

View File

@@ -24,11 +24,11 @@
create table llx_c_regions
(
rowid serial PRIMARY KEY,
code_region integer UNIQUE not null,
fk_pays integer not null,
code_region integer UNIQUE NOT NULL,
fk_pays integer NOT NULL,
cheflieu varchar(7),
tncc integer,
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
(
rowid SERIAL PRIMARY KEY,
datec timestamp,
datec timestamp without time zone,
tms timestamp,
label varchar(30),
courant smallint default 0 not null,
clos smallint default 0 not null,
courant smallint DEFAULT 0 NOT NULL,
clos smallint DEFAULT 0 NOT NULL,
account_number varchar(8)
);