nouvelle version des tables posgtresql

beautification du code, tout les parametres en MAJUSCULES
This commit is contained in:
opensides 2004-10-10 10:25:57 +00:00
parent 509f0a2eee
commit 9b027fbc50
31 changed files with 175 additions and 218 deletions

View File

@ -25,7 +25,7 @@ create table llx_propal
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_soc integer, fk_soc integer,
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 datetime, -- date de creation
fin_validite datetime, -- date de fin de validite fin_validite datetime, -- date de fin de validite
@ -35,12 +35,12 @@ create table llx_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
fk_user_cloture integer, -- cloture de la propale signee ou non signee fk_user_cloture integer, -- cloture de la propale signee ou non signee
fk_statut smallint default 0, fk_statut smallint DEFAULT 0,
price real default 0, price real DEFAULT 0,
remise_percent real default 0, remise_percent real DEFAULT 0,
remise real default 0, remise real DEFAULT 0,
tva real default 0, tva real DEFAULT 0,
total real default 0, total real DEFAULT 0,
note text, note text,
model_pdf varchar(50), model_pdf varchar(50),
UNIQUE INDEX (ref) UNIQUE INDEX (ref)

View File

@ -26,6 +26,6 @@ create table llx_rights_def
libelle varchar(255), libelle varchar(255),
module varchar(12), module varchar(12),
type enum('r','w','m','d','a'), type enum('r','w','m','d','a'),
bydefault tinyint default 0 bydefault tinyint DEFAULT 0
)type=innodb; )type=innodb;

View File

@ -17,14 +17,15 @@
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
--
-- ======================================================================== -- ========================================================================
create table llx_soc_events create table llx_soc_events
( (
rowid integer AUTO_INCREMENT PRIMARY KEY, -- public id rowid integer AUTO_INCREMENT PRIMARY KEY, -- public id
fk_soc int NOT NULL, -- fk_soc int NOT NULL, --
dateb datetime NOT NULL, -- begin date dateb datetime NOT NULL, -- begin date
datee datetime NOT NULL, -- end date datee datetime NOT NULL, -- end date
title varchar(100) NOT NULL, title varchar(100) NOT NULL,
url varchar(255), url varchar(255),
description text description text

View File

@ -1,9 +1,6 @@
-- =================================================================== -- ===================================================================
-- Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- $Id$
-- $Source$
--
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
@ -20,6 +17,9 @@
-- --
-- Societes a recontacter -- Societes a recontacter
-- --
-- $Id$
-- $Source$
--
-- =================================================================== -- ===================================================================
create table llx_soc_recontact create table llx_soc_recontact

View File

@ -22,42 +22,42 @@
create table llx_societe create table llx_societe
( (
idp integer AUTO_INCREMENT PRIMARY KEY, idp integer AUTO_INCREMENT PRIMARY KEY,
id varchar(32), -- private id id varchar(32), -- private id
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 datetime, -- creation date
datea datetime, -- activation date datea datetime, -- activation date
nom varchar(60), -- company name nom varchar(60), -- company name
address varchar(255), -- company adresse address varchar(255), -- company adresse
cp varchar(10), -- zipcode cp varchar(10), -- zipcode
ville varchar(50), -- town ville varchar(50), -- town
fk_departement integer default 0, -- fk_departement integer DEFAULT 0, --
fk_pays integer default 0, -- fk_pays integer DEFAULT 0, --
tel varchar(20), -- phone number tel varchar(20), -- phone number
fax varchar(20), -- fax number fax varchar(20), -- fax number
url varchar(255), -- url varchar(255), --
fk_secteur integer default 0, -- fk_secteur integer DEFAULT 0, --
fk_effectif integer default 0, -- fk_effectif integer DEFAULT 0, --
fk_typent integer default 0, -- fk_typent integer DEFAULT 0, --
fk_forme_juridique integer default 0, -- forme juridique INSEE fk_forme_juridique integer DEFAULT 0, -- forme juridique INSEE
siren varchar(9), -- siren ou RCS siren varchar(9), -- siren ou RCS
siret varchar(14), -- numero de siret siret varchar(14), -- numero de siret
ape varchar(4), -- code ape ape varchar(4), -- code ape
tva_intra varchar(20), -- tva intracommunautaire tva_intra varchar(20), -- tva intracommunautaire
capital real, -- capital de la société capital real, -- capital de la société
description text, -- description text, --
fk_stcomm smallint default 0, -- commercial statut fk_stcomm smallint DEFAULT 0, -- commercial statut
note text, -- note text, --
services integer default 0, -- services integer DEFAULT 0, --
prefix_comm varchar(5), -- prefix commercial prefix_comm varchar(5), -- prefix commercial
client int default 0, -- client oui/non client integer DEFAULT 0, -- client oui/non
fournisseur smallint default 0, -- fournisseur oui/non fournisseur smallint DEFAULT 0, -- fournisseur oui/non
rubrique varchar(255), -- champ rubrique libre rubrique varchar(255), -- champ rubrique libre
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) UNIQUE INDEX(prefix_comm)
)type=innodb; )type=innodb;

View File

@ -29,7 +29,7 @@ create table llx_societe_remise
tms timestamp, tms timestamp,
datec datetime, -- creation date datec datetime, -- 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
)type=innodb; )type=innodb;

View File

@ -38,7 +38,7 @@ create table llx_socpeople
fax varchar(30), fax varchar(30),
email varchar(255), email varchar(255),
jabberid varchar(255), jabberid varchar(255),
fk_user integer default 0, -- user qui a créé l'enregistrement fk_user integer DEFAULT 0, -- user qui a créé l'enregistrement
fk_user_modif integer, fk_user_modif integer,
note text note text
)type=innodb; )type=innodb;

View File

@ -32,7 +32,7 @@ create table llx_todocomm
fk_user_author integer, -- id auteur de l'action fk_user_author integer, -- id auteur de l'action
fk_soc integer, -- id de la societe auquel est rattachee l'action fk_soc integer, -- id de la societe auquel est rattachee l'action
fk_contact integer, -- id du contact sur laquelle l'action fk_contact integer, -- id du contact sur laquelle l'action
-- doit etre effectuee -- doit etre effectuee
note text note text
)type=innodb; )type=innodb;

View File

@ -26,7 +26,7 @@ create table llx_tva
tms timestamp, tms timestamp,
datep date, -- date de paiement datep date, -- date de paiement
datev date, -- date de valeur datev date, -- date de valeur
amount real NOT NULL default 0, amount real NOT NULL DEFAULT 0,
label varchar(255), label varchar(255),
note text note text
)type=innodb; )type=innodb;

View File

@ -31,12 +31,12 @@ create table llx_user
firstname varchar(50), firstname varchar(50),
code varchar(4), code varchar(4),
email varchar(255), email varchar(255),
admin smallint default 0, admin smallint DEFAULT 0,
webcal_login varchar(25), webcal_login varchar(25),
module_comm smallint default 1, module_comm smallint DEFAULT 1,
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) UNIQUE INDEX(login)

View File

@ -27,5 +27,6 @@ create table llx_user_param
page varchar(255), page varchar(255),
param varchar(64), param varchar(64),
value varchar(255), value varchar(255),
UNIQUE (fk_user,page,param) UNIQUE (fk_user,page,param)
)type=innodb; )type=innodb;

View File

@ -24,6 +24,7 @@ create table llx_user_rights
( (
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) UNIQUE(fk_user,fk_id)
)type=innodb; )type=innodb;

View File

@ -28,7 +28,7 @@ create table llx_ventes
dated datetime, -- date debut dated datetime, -- date debut
datef datetime, -- date fin datef datetime, -- date fin
price real, price real,
author varchar(30), author varchar(30),
active smallint DEFAULT 0 NOT NULL, active smallint DEFAULT 0 NOT NULL,
note varchar(255) note varchar(255)
)type=innodb; )type=innodb;

View File

@ -33,8 +33,8 @@ create table llx_voyage
dateo date, -- date operation dateo date, -- date operation
date_depart datetime, -- date du voyage date_depart datetime, -- date du voyage
date_arrivee datetime, -- date du voyage date_arrivee datetime, -- 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),
arrivee varchar(255), arrivee varchar(255),
fk_type smallint, -- Train, Avion, Bateaux fk_type smallint, -- Train, Avion, Bateaux

View File

@ -27,7 +27,7 @@ create table llx_voyage_reduc
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,
amount real NOT NULL default 0, amount real NOT NULL DEFAULT 0,
label varchar(255), label varchar(255),
numero varchar(255), numero varchar(255),
fk_type smallint, -- Train, Avion, Bateaux fk_type smallint, -- Train, Avion, Bateaux

View File

@ -27,22 +27,22 @@ create table llx_propal
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
fk_soc integer, fk_soc integer,
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 timestamp, -- date de creation datec timestamp without time zone, -- date de creation
fin_validite timestamp, -- date de fin de validite fin_validite timestamp without time zone, -- date de fin de validite
date_valid timestamp, -- date de validation date_valid timestamp without time zone, -- date de validation
date_cloture timestamp, -- date de cloture date_cloture timestamp without time zone, -- 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
fk_user_cloture integer, -- cloture de la propale signee ou non signee fk_user_cloture integer, -- cloture de la propale signee ou non signee
fk_statut smallint default 0, fk_statut smallint DEFAULT 0,
price real default 0, price real DEFAULT 0,
remise_percent real default 0, remise_percent real DEFAULT 0,
remise real default 0, remise real DEFAULT 0,
tva real default 0, tva real DEFAULT 0,
total real default 0, total real DEFAULT 0,
note text, note text,
model_pdf varchar(50) model_pdf varchar(50)
); );

View File

@ -26,7 +26,7 @@ create table llx_rights_def
id integer PRIMARY KEY, id integer PRIMARY KEY,
libelle varchar(255), libelle varchar(255),
module varchar(12), module varchar(12),
type CHAR CHECK (type IN ('r','w','m','d','a')), type CHAR CHECK (type IN ('r','w','m','d','a')),
bydefault smallint default 0 bydefault smallint DEFAULT 0
); );

View File

@ -1,41 +0,0 @@
-- ===================================================================
-- Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2002-2003 Éric Seigne <erics@rycks.com>
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id$
-- $Source$
--
-- ===================================================================
create table llx_service
(
rowid SERIAL PRIMARY KEY,
datec timestamp,
tms timestamp,
ref varchar(15),
label varchar(255),
description text,
price smallint,
duration varchar(32),
debut_comm timestamp,
fin_comm timestamp,
fk_user_author integer,
fk_user_modif integer
);
create unique index llx_service_ref on llx_service(ref);

View File

@ -24,10 +24,10 @@
create table llx_soc_events create table llx_soc_events
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY, -- public id
fk_soc int NOT NULL, -- fk_soc int NOT NULL,
dateb timestamp NOT NULL, -- begin date dateb timestamp without time zone NOT NULL, -- begin date
datee timestamp NOT NULL, -- end date datee timestamp without time zone NOT NULL, -- end date
title varchar(100) NOT NULL, title varchar(100) NOT NULL,
url varchar(255), url varchar(255),
description text description text

View File

@ -28,6 +28,6 @@ create table llx_soc_recontact
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
fk_soc integer, fk_soc integer,
datere timestamp, datere timestamp without time zone,
author varchar(15) author varchar(15)
); );

View File

@ -24,42 +24,42 @@
create table llx_societe create table llx_societe
( (
idp SERIAL PRIMARY KEY, idp SERIAL PRIMARY KEY,
id varchar(32), -- private id id varchar(32), -- private id
active smallint default 0, -- active smallint DEFAULT 0, --
parent integer default 0, -- parent integer DEFAULT 0, --
tms timestamp, tms timestamp,
datec timestamp, -- creation date datec timestamp without time zone, -- creation date
datea timestamp, -- activation date datea timestamp without time zone, -- activation date
nom varchar(60), -- company name nom varchar(60), -- company name
address varchar(255), -- company adresse address varchar(255), -- company adresse
cp varchar(10), -- zipcode cp varchar(10), -- zipcode
ville varchar(50), -- town ville varchar(50), -- town
fk_departement integer default 0, -- fk_departement integer DEFAULT 0, --
fk_pays integer default 0, -- fk_pays integer DEFAULT 0, --
tel varchar(20), -- phone number tel varchar(20), -- phone number
fax varchar(20), -- fax number fax varchar(20), -- fax number
url varchar(255), -- url varchar(255), --
fk_secteur integer default 0, -- fk_secteur integer DEFAULT 0, --
fk_effectif integer default 0, -- fk_effectif integer DEFAULT 0, --
fk_typent integer default 0, -- fk_typent integer DEFAULT 0, --
fk_forme_juridique integer default 0, -- forme juridique INSEE fk_forme_juridique integer DEFAULT 0, -- forme juridique INSEE
siren varchar(9), -- siren varchar(9), --
siret varchar(14), -- numero de siret siret varchar(14), -- numero de siret
ape varchar(4), -- code ape ape varchar(4), -- code ape
tva_intra varchar(20), -- tva intracommunautaire tva_intra varchar(20), -- tva intracommunautaire
capital real, -- capital de la société capital real, -- capital de la société
description text, -- description text, --
fk_stcomm smallint default 0, -- commercial statut fk_stcomm smallint DEFAULT 0, -- commercial statut
note text, -- note text, --
services integer default 0, -- services integer DEFAULT 0, --
prefix_comm varchar(5), -- prefix commercial prefix_comm varchar(5), -- prefix commercial
client smallint default 0, -- client oui/non client integer DEFAULT 0, -- client oui/non
fournisseur smallint default 0, -- fournisseur oui/non fournisseur smallint DEFAULT 0, -- fournisseur oui/non
rubrique varchar(255), -- champ rubrique libre rubrique varchar(255), -- champ rubrique libre
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
); );
create unique index llx_societe_prefix_comm on llx_societe(prefix_comm); create unique index llx_societe_prefix_comm on llx_societe(prefix_comm);

View File

@ -27,9 +27,9 @@ 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 timestamp, -- creation date datec timestamp without time zone, -- 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
); );

View File

@ -24,25 +24,25 @@
create table llx_socpeople create table llx_socpeople
( (
idp SERIAL PRIMARY KEY, idp SERIAL PRIMARY KEY,
datec timestamp, datec timestamp without time zone,
tms timestamp, tms timestamp,
fk_soc integer, -- lien vers la societe fk_soc integer, -- lien vers la societe
civilite varchar(6), civilite varchar(6),
name varchar(50), name varchar(50),
firstname varchar(50), firstname varchar(50),
address varchar(255), address varchar(255),
birthday date, birthday date,
poste varchar(80), poste varchar(80),
phone varchar(30), phone varchar(30),
phone_perso varchar(30), phone_perso varchar(30),
phone_mobile varchar(30), phone_mobile varchar(30),
fax varchar(30), fax varchar(30),
email varchar(255), email varchar(255),
jabberid varchar(255), jabberid varchar(255),
fk_user integer default 0, -- user qui a créé l'enregistrement fk_user integer DEFAULT 0, -- user qui a créé l'enregistrement
fk_user_modif integer, fk_user_modif integer,
note text note text
); );
CREATE INDEX llx_socpeople_fk_soc ON llx_socpeople(fk_soc); CREATE INDEX llx_socpeople_fk_soc ON llx_socpeople(fk_soc);

View File

@ -25,7 +25,7 @@
create table llx_socstatutlog create table llx_socstatutlog
( (
id SERIAL PRIMARY KEY, id SERIAL PRIMARY KEY,
datel timestamp, datel timestamp without time zone,
fk_soc integer, fk_soc integer,
fk_statut integer, fk_statut integer,
author varchar(30) author varchar(30)

View File

@ -25,7 +25,7 @@ create table llx_stock_mouvement
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
tms timestamp, tms timestamp,
datem timestamp, datem timestamp without time zone,
fk_product integer NOT NULL, fk_product integer NOT NULL,
fk_stock integer NOT NULL, fk_stock integer NOT NULL,
value integer, value integer,

View File

@ -27,13 +27,13 @@
create table llx_todocomm create table llx_todocomm
( (
id SERIAL PRIMARY KEY, id SERIAL PRIMARY KEY,
datea timestamp, -- date de l'action datea timestamp without time zone, -- 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
fk_soc integer, -- id de la societe auquel est rattachee l'action fk_soc integer, -- id de la societe auquel est rattachee l'action
fk_contact integer, -- id du contact sur laquelle l'action fk_contact integer, -- id du contact sur laquelle l'action
-- doit etre effectuee -- doit etre effectuee
note text note text
); );

View File

@ -28,7 +28,7 @@ create table llx_tva
tms timestamp, tms timestamp,
datep date, -- date de paiement datep date, -- date de paiement
datev date, -- date de valeur datev date, -- date de valeur
amount real NOT NULL default 0, amount real NOT NULL DEFAULT 0,
label varchar(255), label varchar(255),
note text note text
); );

View File

@ -25,7 +25,7 @@
create table llx_user create table llx_user
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
datec timestamp, datec timestamp without time zone,
tms timestamp, tms timestamp,
login varchar(8), login varchar(8),
pass varchar(32), pass varchar(32),
@ -33,12 +33,12 @@ create table llx_user
firstname varchar(50), firstname varchar(50),
code varchar(4), code varchar(4),
email varchar(255), email varchar(255),
admin smallint default 0, admin smallint DEFAULT 0,
webcal_login varchar(25), webcal_login varchar(25),
module_comm smallint default 1, module_comm smallint DEFAULT 1,
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
); );

View File

@ -27,10 +27,10 @@ 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 timestamp, -- date debut dated timestamp without time zone, -- date debut
datef timestamp, -- date fin datef timestamp without time zone, -- date fin
price real, price real,
author varchar(30), author varchar(30),
active smallint DEFAULT 0 NOT NULL, active smallint DEFAULT 0 NOT NULL,
note varchar(255) note varchar(255)
); );

View File

@ -25,23 +25,18 @@
create table llx_voyage create table llx_voyage
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
datec timestamp, datec timestamp without time zone,
dateo date, -- date operation
date_depart timestamp, -- date du voyage dateo date, -- date operation
date_arrivee timestamp, -- date du voyage date_depart timestamp without time zone, -- date du voyage
amount real NOT NULL default 0, -- prix du billet date_arrivee timestamp without time zone, -- date du voyage
reduction real NOT NULL default 0, -- montant de la reduction obtenue amount real NOT NULL DEFAULT 0, -- prix du billet
reduction real NOT NULL DEFAULT 0, -- montant de la reduction obtenue
depart varchar(255), depart varchar(255),
arrivee varchar(255), arrivee varchar(255),
fk_type smallint, -- Train, Avion, Bateaux fk_type smallint, -- Train, Avion, Bateaux
fk_reduc integer, fk_reduc integer,
distance integer, -- distance en kilometre distance integer, -- distance en kilometre
dossier varchar(50), -- numero de dossier dossier varchar(50), -- numero de dossier
note text note text
); );
-- insert into llx_voyage (date_depart, date_arrivee, amount, depart, arrivee, fk_reduc)
-- values ('2002-04-21 12:05','2002-04-21 15:25',26.8,'Paris','Auray',1);
-- insert into llx_voyage (date_depart, date_arrivee, amount, depart, arrivee, fk_reduc)
-- values ('2002-04-23 15:42','2002-04-23 19:10',26.8,'Auray','Paris',1);

View File

@ -25,11 +25,11 @@
create table llx_voyage_reduc create table llx_voyage_reduc
( (
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
date_debut date, -- date operation date_debut date, -- date operation
date_fin date, date_fin date,
amount real NOT NULL default 0, amount real NOT NULL DEFAULT 0,
label varchar(255), label varchar(255),
numero varchar(255), numero varchar(255),
fk_type smallint, -- Train, Avion, Bateaux fk_type smallint, -- Train, Avion, Bateaux