From 9b027fbc5091b37ad519285048cfcd45f39b7cce Mon Sep 17 00:00:00 2001 From: opensides Date: Sun, 10 Oct 2004 10:25:57 +0000 Subject: [PATCH] nouvelle version des tables posgtresql beautification du code, tout les parametres en MAJUSCULES --- mysql/tables/llx_propal.sql | 14 +++--- mysql/tables/llx_rights_def.sql | 2 +- mysql/tables/llx_soc_events.sql | 7 +-- mysql/tables/llx_soc_recontact.sql | 6 +-- mysql/tables/llx_societe.sql | 72 ++++++++++++++-------------- mysql/tables/llx_societe_remise.sql | 2 +- mysql/tables/llx_socpeople.sql | 2 +- mysql/tables/llx_todocomm.sql | 2 +- mysql/tables/llx_tva.sql | 2 +- mysql/tables/llx_user.sql | 10 ++-- mysql/tables/llx_user_param.sql | 1 + mysql/tables/llx_user_rights.sql | 1 + mysql/tables/llx_ventes.sql | 2 +- mysql/tables/llx_voyage.sql | 4 +- mysql/tables/llx_voyage_reduc.sql | 2 +- pgsql/tables/llx_propal.sql | 32 ++++++------- pgsql/tables/llx_rights_def.sql | 4 +- pgsql/tables/llx_service.sql | 41 ---------------- pgsql/tables/llx_soc_events.sql | 8 ++-- pgsql/tables/llx_soc_recontact.sql | 2 +- pgsql/tables/llx_societe.sql | 72 ++++++++++++++-------------- pgsql/tables/llx_societe_remise.sql | 4 +- pgsql/tables/llx_socpeople.sql | 34 ++++++------- pgsql/tables/llx_socstatutlog.sql | 2 +- pgsql/tables/llx_stock_mouvement.sql | 2 +- pgsql/tables/llx_todocomm.sql | 14 +++--- pgsql/tables/llx_tva.sql | 2 +- pgsql/tables/llx_user.sql | 12 ++--- pgsql/tables/llx_ventes.sql | 6 +-- pgsql/tables/llx_voyage.sql | 25 ++++------ pgsql/tables/llx_voyage_reduc.sql | 4 +- 31 files changed, 175 insertions(+), 218 deletions(-) delete mode 100644 pgsql/tables/llx_service.sql diff --git a/mysql/tables/llx_propal.sql b/mysql/tables/llx_propal.sql index 62d3577cfeb..9c46daf396b 100644 --- a/mysql/tables/llx_propal.sql +++ b/mysql/tables/llx_propal.sql @@ -25,7 +25,7 @@ create table llx_propal rowid integer AUTO_INCREMENT PRIMARY KEY, fk_soc 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 datec datetime, -- date de creation 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_valid integer, -- valideur de la propale fk_user_cloture integer, -- cloture de la propale signee ou non signee - fk_statut smallint default 0, - price real default 0, - remise_percent real default 0, - remise real default 0, - tva real default 0, - total real default 0, + fk_statut smallint DEFAULT 0, + price real DEFAULT 0, + remise_percent real DEFAULT 0, + remise real DEFAULT 0, + tva real DEFAULT 0, + total real DEFAULT 0, note text, model_pdf varchar(50), UNIQUE INDEX (ref) diff --git a/mysql/tables/llx_rights_def.sql b/mysql/tables/llx_rights_def.sql index 0211d93808f..4910d180d8b 100644 --- a/mysql/tables/llx_rights_def.sql +++ b/mysql/tables/llx_rights_def.sql @@ -26,6 +26,6 @@ create table llx_rights_def libelle varchar(255), module varchar(12), type enum('r','w','m','d','a'), - bydefault tinyint default 0 + bydefault tinyint DEFAULT 0 )type=innodb; diff --git a/mysql/tables/llx_soc_events.sql b/mysql/tables/llx_soc_events.sql index c72d16cc487..43bc5afc7cf 100644 --- a/mysql/tables/llx_soc_events.sql +++ b/mysql/tables/llx_soc_events.sql @@ -17,14 +17,15 @@ -- -- $Id$ -- $Source$ +-- -- ======================================================================== create table llx_soc_events ( rowid integer AUTO_INCREMENT PRIMARY KEY, -- public id - fk_soc int NOT NULL, -- - dateb datetime NOT NULL, -- begin date - datee datetime NOT NULL, -- end date + fk_soc int NOT NULL, -- + dateb datetime NOT NULL, -- begin date + datee datetime NOT NULL, -- end date title varchar(100) NOT NULL, url varchar(255), description text diff --git a/mysql/tables/llx_soc_recontact.sql b/mysql/tables/llx_soc_recontact.sql index 4071eb9e546..ee976a7c196 100644 --- a/mysql/tables/llx_soc_recontact.sql +++ b/mysql/tables/llx_soc_recontact.sql @@ -1,9 +1,6 @@ -- =================================================================== -- Copyright (C) 2002 Rodolphe Quiedeville -- --- $Id$ --- $Source$ --- -- 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 @@ -20,6 +17,9 @@ -- -- Societes a recontacter -- +-- $Id$ +-- $Source$ +-- -- =================================================================== create table llx_soc_recontact diff --git a/mysql/tables/llx_societe.sql b/mysql/tables/llx_societe.sql index f691488c184..e3207a94fb8 100644 --- a/mysql/tables/llx_societe.sql +++ b/mysql/tables/llx_societe.sql @@ -22,42 +22,42 @@ create table llx_societe ( - idp integer AUTO_INCREMENT PRIMARY KEY, - id varchar(32), -- private id - active smallint default 0, -- - parent integer default 0, -- - tms timestamp, - datec datetime, -- creation date - datea datetime, -- activation date - nom varchar(60), -- company name - address varchar(255), -- company adresse - cp varchar(10), -- zipcode - ville varchar(50), -- town - fk_departement integer default 0, -- - fk_pays integer default 0, -- - tel varchar(20), -- phone number - fax varchar(20), -- fax number - url varchar(255), -- - fk_secteur integer default 0, -- - fk_effectif integer default 0, -- - fk_typent integer default 0, -- - fk_forme_juridique integer default 0, -- forme juridique INSEE - siren varchar(9), -- siren ou RCS - siret varchar(14), -- numero de siret - ape varchar(4), -- code ape - tva_intra varchar(20), -- tva intracommunautaire - capital real, -- capital de la société - description text, -- - fk_stcomm smallint default 0, -- commercial statut - note text, -- - services integer default 0, -- - prefix_comm varchar(5), -- prefix commercial - client int default 0, -- client oui/non - fournisseur smallint default 0, -- fournisseur oui/non - rubrique varchar(255), -- champ rubrique libre - fk_user_creat integer, -- utilisateur qui a créé l'info - fk_user_modif integer, -- utilisateur qui a modifié l'info - remise_client real default 0, -- remise systématique pour le client + idp integer AUTO_INCREMENT PRIMARY KEY, + id varchar(32), -- private id + active smallint DEFAULT 0, -- + parent integer DEFAULT 0, -- + tms timestamp, + datec datetime, -- creation date + datea datetime, -- activation date + nom varchar(60), -- company name + address varchar(255), -- company adresse + cp varchar(10), -- zipcode + ville varchar(50), -- town + fk_departement integer DEFAULT 0, -- + fk_pays integer DEFAULT 0, -- + tel varchar(20), -- phone number + fax varchar(20), -- fax number + url varchar(255), -- + fk_secteur integer DEFAULT 0, -- + fk_effectif integer DEFAULT 0, -- + fk_typent integer DEFAULT 0, -- + fk_forme_juridique integer DEFAULT 0, -- forme juridique INSEE + siren varchar(9), -- siren ou RCS + siret varchar(14), -- numero de siret + ape varchar(4), -- code ape + tva_intra varchar(20), -- tva intracommunautaire + capital real, -- capital de la société + description text, -- + fk_stcomm smallint DEFAULT 0, -- commercial statut + note text, -- + services integer DEFAULT 0, -- + prefix_comm varchar(5), -- prefix commercial + client integer DEFAULT 0, -- client oui/non + fournisseur smallint DEFAULT 0, -- fournisseur oui/non + rubrique varchar(255), -- champ rubrique libre + fk_user_creat integer, -- utilisateur qui a créé l'info + fk_user_modif integer, -- utilisateur qui a modifié l'info + remise_client real DEFAULT 0, -- remise systématique pour le client UNIQUE INDEX(prefix_comm) )type=innodb; diff --git a/mysql/tables/llx_societe_remise.sql b/mysql/tables/llx_societe_remise.sql index 93829b6537b..4dc4aa519b6 100644 --- a/mysql/tables/llx_societe_remise.sql +++ b/mysql/tables/llx_societe_remise.sql @@ -29,7 +29,7 @@ create table llx_societe_remise tms timestamp, datec datetime, -- creation date 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 )type=innodb; diff --git a/mysql/tables/llx_socpeople.sql b/mysql/tables/llx_socpeople.sql index 97701697efc..eb747377033 100644 --- a/mysql/tables/llx_socpeople.sql +++ b/mysql/tables/llx_socpeople.sql @@ -38,7 +38,7 @@ create table llx_socpeople fax varchar(30), email 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, note text )type=innodb; diff --git a/mysql/tables/llx_todocomm.sql b/mysql/tables/llx_todocomm.sql index 64a07751b62..ebae8b278ac 100644 --- a/mysql/tables/llx_todocomm.sql +++ b/mysql/tables/llx_todocomm.sql @@ -32,7 +32,7 @@ create table llx_todocomm fk_user_author integer, -- id auteur de l'action fk_soc integer, -- id de la societe auquel est rattachee l'action fk_contact integer, -- id du contact sur laquelle l'action - -- doit etre effectuee + -- doit etre effectuee note text )type=innodb; diff --git a/mysql/tables/llx_tva.sql b/mysql/tables/llx_tva.sql index b5ade2d0016..04aac771b03 100644 --- a/mysql/tables/llx_tva.sql +++ b/mysql/tables/llx_tva.sql @@ -26,7 +26,7 @@ create table llx_tva tms timestamp, datep date, -- date de paiement datev date, -- date de valeur - amount real NOT NULL default 0, + amount real NOT NULL DEFAULT 0, label varchar(255), note text )type=innodb; diff --git a/mysql/tables/llx_user.sql b/mysql/tables/llx_user.sql index df07ae00527..9aca4420cd0 100644 --- a/mysql/tables/llx_user.sql +++ b/mysql/tables/llx_user.sql @@ -31,12 +31,12 @@ create table llx_user firstname varchar(50), code varchar(4), email varchar(255), - admin smallint default 0, + admin smallint DEFAULT 0, webcal_login varchar(25), - module_comm smallint default 1, - module_compta smallint default 1, - fk_societe integer default 0, - fk_socpeople integer default 0, + module_comm smallint DEFAULT 1, + module_compta smallint DEFAULT 1, + fk_societe integer DEFAULT 0, + fk_socpeople integer DEFAULT 0, note text, UNIQUE INDEX(login) diff --git a/mysql/tables/llx_user_param.sql b/mysql/tables/llx_user_param.sql index 86556ab6939..a3a62b40cb9 100644 --- a/mysql/tables/llx_user_param.sql +++ b/mysql/tables/llx_user_param.sql @@ -27,5 +27,6 @@ create table llx_user_param page varchar(255), param varchar(64), value varchar(255), + UNIQUE (fk_user,page,param) )type=innodb; diff --git a/mysql/tables/llx_user_rights.sql b/mysql/tables/llx_user_rights.sql index 8fb3592910a..1a852e78acb 100644 --- a/mysql/tables/llx_user_rights.sql +++ b/mysql/tables/llx_user_rights.sql @@ -24,6 +24,7 @@ create table llx_user_rights ( fk_user integer NOT NULL, fk_id integer NOT NULL, + UNIQUE(fk_user,fk_id) )type=innodb; diff --git a/mysql/tables/llx_ventes.sql b/mysql/tables/llx_ventes.sql index 7121b26c6e0..0ba9cb6b862 100644 --- a/mysql/tables/llx_ventes.sql +++ b/mysql/tables/llx_ventes.sql @@ -28,7 +28,7 @@ create table llx_ventes dated datetime, -- date debut datef datetime, -- date fin price real, - author varchar(30), + author varchar(30), active smallint DEFAULT 0 NOT NULL, note varchar(255) )type=innodb; diff --git a/mysql/tables/llx_voyage.sql b/mysql/tables/llx_voyage.sql index b257e7ffaaa..3e26be2b247 100644 --- a/mysql/tables/llx_voyage.sql +++ b/mysql/tables/llx_voyage.sql @@ -33,8 +33,8 @@ create table llx_voyage dateo date, -- date operation date_depart datetime, -- date du voyage date_arrivee datetime, -- date du voyage - amount real NOT NULL default 0, -- prix du billet - 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), arrivee varchar(255), fk_type smallint, -- Train, Avion, Bateaux diff --git a/mysql/tables/llx_voyage_reduc.sql b/mysql/tables/llx_voyage_reduc.sql index f23693994a5..60bfcae7add 100644 --- a/mysql/tables/llx_voyage_reduc.sql +++ b/mysql/tables/llx_voyage_reduc.sql @@ -27,7 +27,7 @@ create table llx_voyage_reduc datev date, -- date de valeur date_debut date, -- date operation date_fin date, - amount real NOT NULL default 0, + amount real NOT NULL DEFAULT 0, label varchar(255), numero varchar(255), fk_type smallint, -- Train, Avion, Bateaux diff --git a/pgsql/tables/llx_propal.sql b/pgsql/tables/llx_propal.sql index 646753c5810..2d512368d4a 100644 --- a/pgsql/tables/llx_propal.sql +++ b/pgsql/tables/llx_propal.sql @@ -27,22 +27,22 @@ create table llx_propal rowid SERIAL PRIMARY KEY, fk_soc integer, fk_soc_contact integer, - fk_projet integer default 0, -- projet auquel est rattache la propale - ref varchar(30) NOT NULL, -- propal number - datec timestamp, -- date de creation - fin_validite timestamp, -- date de fin de validite - date_valid timestamp, -- date de validation - date_cloture timestamp, -- date de cloture - datep date, -- date de la propal - fk_user_author integer, -- createur de la propale - fk_user_valid integer, -- valideur de la propale - fk_user_cloture integer, -- cloture de la propale signee ou non signee - fk_statut smallint default 0, - price real default 0, - remise_percent real default 0, - remise real default 0, - tva real default 0, - total real default 0, + fk_projet integer DEFAULT 0, -- projet auquel est rattache la propale + ref varchar(30) NOT NULL, -- propal number + datec timestamp without time zone, -- date de creation + fin_validite timestamp without time zone, -- date de fin de validite + date_valid timestamp without time zone, -- date de validation + date_cloture timestamp without time zone, -- date de cloture + datep date, -- date de la propal + fk_user_author integer, -- createur de la propale + fk_user_valid integer, -- valideur de la propale + fk_user_cloture integer, -- cloture de la propale signee ou non signee + fk_statut smallint DEFAULT 0, + price real DEFAULT 0, + remise_percent real DEFAULT 0, + remise real DEFAULT 0, + tva real DEFAULT 0, + total real DEFAULT 0, note text, model_pdf varchar(50) ); diff --git a/pgsql/tables/llx_rights_def.sql b/pgsql/tables/llx_rights_def.sql index 234b5b30add..407a2663105 100644 --- a/pgsql/tables/llx_rights_def.sql +++ b/pgsql/tables/llx_rights_def.sql @@ -26,7 +26,7 @@ create table llx_rights_def id integer PRIMARY KEY, libelle varchar(255), module varchar(12), - type CHAR CHECK (type IN ('r','w','m','d','a')), - bydefault smallint default 0 + type CHAR CHECK (type IN ('r','w','m','d','a')), + bydefault smallint DEFAULT 0 ); diff --git a/pgsql/tables/llx_service.sql b/pgsql/tables/llx_service.sql deleted file mode 100644 index 1db45aad74e..00000000000 --- a/pgsql/tables/llx_service.sql +++ /dev/null @@ -1,41 +0,0 @@ --- =================================================================== --- Copyright (C) 2002 Rodolphe Quiedeville --- Copyright (C) 2002-2003 Éric Seigne --- Copyright (C) 2004 Benoit Mortier --- --- 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); diff --git a/pgsql/tables/llx_soc_events.sql b/pgsql/tables/llx_soc_events.sql index 924d315a497..5574d742bd9 100644 --- a/pgsql/tables/llx_soc_events.sql +++ b/pgsql/tables/llx_soc_events.sql @@ -24,10 +24,10 @@ create table llx_soc_events ( - rowid SERIAL PRIMARY KEY, - fk_soc int NOT NULL, -- - dateb timestamp NOT NULL, -- begin date - datee timestamp NOT NULL, -- end date + rowid SERIAL PRIMARY KEY, -- public id + fk_soc int NOT NULL, + dateb timestamp without time zone NOT NULL, -- begin date + datee timestamp without time zone NOT NULL, -- end date title varchar(100) NOT NULL, url varchar(255), description text diff --git a/pgsql/tables/llx_soc_recontact.sql b/pgsql/tables/llx_soc_recontact.sql index 6e35fa85df7..22bcb685999 100644 --- a/pgsql/tables/llx_soc_recontact.sql +++ b/pgsql/tables/llx_soc_recontact.sql @@ -28,6 +28,6 @@ create table llx_soc_recontact ( rowid SERIAL PRIMARY KEY, fk_soc integer, - datere timestamp, + datere timestamp without time zone, author varchar(15) ); diff --git a/pgsql/tables/llx_societe.sql b/pgsql/tables/llx_societe.sql index 2e9bd822644..c71ad3ac004 100644 --- a/pgsql/tables/llx_societe.sql +++ b/pgsql/tables/llx_societe.sql @@ -24,42 +24,42 @@ create table llx_societe ( - idp SERIAL PRIMARY KEY, - id varchar(32), -- private id - active smallint default 0, -- - parent integer default 0, -- - tms timestamp, - datec timestamp, -- creation date - datea timestamp, -- activation date - nom varchar(60), -- company name - address varchar(255), -- company adresse - cp varchar(10), -- zipcode - ville varchar(50), -- town - fk_departement integer default 0, -- - fk_pays integer default 0, -- - tel varchar(20), -- phone number - fax varchar(20), -- fax number - url varchar(255), -- - fk_secteur integer default 0, -- - fk_effectif integer default 0, -- - fk_typent integer default 0, -- - fk_forme_juridique integer default 0, -- forme juridique INSEE - siren varchar(9), -- - siret varchar(14), -- numero de siret - ape varchar(4), -- code ape - tva_intra varchar(20), -- tva intracommunautaire - capital real, -- capital de la société - description text, -- - fk_stcomm smallint default 0, -- commercial statut - note text, -- - services integer default 0, -- - prefix_comm varchar(5), -- prefix commercial - client smallint default 0, -- client oui/non - fournisseur smallint default 0, -- fournisseur oui/non - rubrique varchar(255), -- champ rubrique libre - fk_user_creat integer, -- utilisateur qui a créé l'info - fk_user_modif integer, -- utilisateur qui a modifié l'info - remise_client real default 0 -- remise systématique pour le client + idp SERIAL PRIMARY KEY, + id varchar(32), -- private id + active smallint DEFAULT 0, -- + parent integer DEFAULT 0, -- + tms timestamp, + datec timestamp without time zone, -- creation date + datea timestamp without time zone, -- activation date + nom varchar(60), -- company name + address varchar(255), -- company adresse + cp varchar(10), -- zipcode + ville varchar(50), -- town + fk_departement integer DEFAULT 0, -- + fk_pays integer DEFAULT 0, -- + tel varchar(20), -- phone number + fax varchar(20), -- fax number + url varchar(255), -- + fk_secteur integer DEFAULT 0, -- + fk_effectif integer DEFAULT 0, -- + fk_typent integer DEFAULT 0, -- + fk_forme_juridique integer DEFAULT 0, -- forme juridique INSEE + siren varchar(9), -- + siret varchar(14), -- numero de siret + ape varchar(4), -- code ape + tva_intra varchar(20), -- tva intracommunautaire + capital real, -- capital de la société + description text, -- + fk_stcomm smallint DEFAULT 0, -- commercial statut + note text, -- + services integer DEFAULT 0, -- + prefix_comm varchar(5), -- prefix commercial + client integer DEFAULT 0, -- client oui/non + fournisseur smallint DEFAULT 0, -- fournisseur oui/non + rubrique varchar(255), -- champ rubrique libre + fk_user_creat integer, -- utilisateur qui a créé l'info + fk_user_modif integer, -- utilisateur qui a modifié l'info + remise_client real DEFAULT 0 -- remise systématique pour le client ); create unique index llx_societe_prefix_comm on llx_societe(prefix_comm); diff --git a/pgsql/tables/llx_societe_remise.sql b/pgsql/tables/llx_societe_remise.sql index 5b3c7d73d71..e9fffb09b2d 100644 --- a/pgsql/tables/llx_societe_remise.sql +++ b/pgsql/tables/llx_societe_remise.sql @@ -27,9 +27,9 @@ create table llx_societe_remise rowid serial PRIMARY KEY, fk_soc integer NOT NULL, tms timestamp, - datec timestamp, -- creation date + datec timestamp without time zone, -- creation date 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 ); diff --git a/pgsql/tables/llx_socpeople.sql b/pgsql/tables/llx_socpeople.sql index 15ccb45fbda..88f744da30f 100644 --- a/pgsql/tables/llx_socpeople.sql +++ b/pgsql/tables/llx_socpeople.sql @@ -24,25 +24,25 @@ create table llx_socpeople ( - idp SERIAL PRIMARY KEY, - datec timestamp, - tms timestamp, - fk_soc integer, -- lien vers la societe - civilite varchar(6), - name varchar(50), - firstname varchar(50), - address varchar(255), + idp SERIAL PRIMARY KEY, + datec timestamp without time zone, + tms timestamp, + fk_soc integer, -- lien vers la societe + civilite varchar(6), + name varchar(50), + firstname varchar(50), + address varchar(255), birthday date, - poste varchar(80), - phone varchar(30), - phone_perso varchar(30), - phone_mobile varchar(30), - fax varchar(30), - email varchar(255), - jabberid varchar(255), - fk_user integer default 0, -- user qui a créé l'enregistrement + poste varchar(80), + phone varchar(30), + phone_perso varchar(30), + phone_mobile varchar(30), + fax varchar(30), + email varchar(255), + jabberid varchar(255), + fk_user integer DEFAULT 0, -- user qui a créé l'enregistrement fk_user_modif integer, - note text + note text ); CREATE INDEX llx_socpeople_fk_soc ON llx_socpeople(fk_soc); diff --git a/pgsql/tables/llx_socstatutlog.sql b/pgsql/tables/llx_socstatutlog.sql index 61a0c96cf9d..1757c960391 100644 --- a/pgsql/tables/llx_socstatutlog.sql +++ b/pgsql/tables/llx_socstatutlog.sql @@ -25,7 +25,7 @@ create table llx_socstatutlog ( id SERIAL PRIMARY KEY, - datel timestamp, + datel timestamp without time zone, fk_soc integer, fk_statut integer, author varchar(30) diff --git a/pgsql/tables/llx_stock_mouvement.sql b/pgsql/tables/llx_stock_mouvement.sql index ef1d327b9ff..44678d0fb5e 100644 --- a/pgsql/tables/llx_stock_mouvement.sql +++ b/pgsql/tables/llx_stock_mouvement.sql @@ -25,7 +25,7 @@ create table llx_stock_mouvement ( rowid SERIAL PRIMARY KEY, tms timestamp, - datem timestamp, + datem timestamp without time zone, fk_product integer NOT NULL, fk_stock integer NOT NULL, value integer, diff --git a/pgsql/tables/llx_todocomm.sql b/pgsql/tables/llx_todocomm.sql index dc07b121d52..1d21947f718 100644 --- a/pgsql/tables/llx_todocomm.sql +++ b/pgsql/tables/llx_todocomm.sql @@ -27,13 +27,13 @@ create table llx_todocomm ( id SERIAL PRIMARY KEY, - datea timestamp, -- date 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_author integer, -- id auteur de l'action - fk_soc integer, -- id de la societe auquel est rattachee l'action - fk_contact integer, -- id du contact sur laquelle l'action - -- doit etre effectuee + datea timestamp without time zone, -- date 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_author integer, -- id auteur de l'action + fk_soc integer, -- id de la societe auquel est rattachee l'action + fk_contact integer, -- id du contact sur laquelle l'action + -- doit etre effectuee note text ); diff --git a/pgsql/tables/llx_tva.sql b/pgsql/tables/llx_tva.sql index 55e195d9530..e1449f6d00f 100644 --- a/pgsql/tables/llx_tva.sql +++ b/pgsql/tables/llx_tva.sql @@ -28,7 +28,7 @@ create table llx_tva tms timestamp, datep date, -- date de paiement datev date, -- date de valeur - amount real NOT NULL default 0, + amount real NOT NULL DEFAULT 0, label varchar(255), note text ); diff --git a/pgsql/tables/llx_user.sql b/pgsql/tables/llx_user.sql index 62a823a8087..d60d4b436f8 100644 --- a/pgsql/tables/llx_user.sql +++ b/pgsql/tables/llx_user.sql @@ -25,7 +25,7 @@ create table llx_user ( rowid SERIAL PRIMARY KEY, - datec timestamp, + datec timestamp without time zone, tms timestamp, login varchar(8), pass varchar(32), @@ -33,12 +33,12 @@ create table llx_user firstname varchar(50), code varchar(4), email varchar(255), - admin smallint default 0, + admin smallint DEFAULT 0, webcal_login varchar(25), - module_comm smallint default 1, - module_compta smallint default 1, - fk_societe integer default 0, - fk_socpeople integer default 0, + module_comm smallint DEFAULT 1, + module_compta smallint DEFAULT 1, + fk_societe integer DEFAULT 0, + fk_socpeople integer DEFAULT 0, note text ); diff --git a/pgsql/tables/llx_ventes.sql b/pgsql/tables/llx_ventes.sql index 3588aa4a366..dc07344baf2 100644 --- a/pgsql/tables/llx_ventes.sql +++ b/pgsql/tables/llx_ventes.sql @@ -27,10 +27,10 @@ create table llx_ventes rowid SERIAL PRIMARY KEY, fk_soc integer NOT NULL, fk_product integer NOT NULL, - dated timestamp, -- date debut - datef timestamp, -- date fin + dated timestamp without time zone, -- date debut + datef timestamp without time zone, -- date fin price real, - author varchar(30), + author varchar(30), active smallint DEFAULT 0 NOT NULL, note varchar(255) ); diff --git a/pgsql/tables/llx_voyage.sql b/pgsql/tables/llx_voyage.sql index 6f52136cd50..abc5a50d45f 100644 --- a/pgsql/tables/llx_voyage.sql +++ b/pgsql/tables/llx_voyage.sql @@ -25,23 +25,18 @@ create table llx_voyage ( rowid SERIAL PRIMARY KEY, - datec timestamp, - dateo date, -- date operation - date_depart timestamp, -- date du voyage - date_arrivee timestamp, -- date du voyage - amount real NOT NULL default 0, -- prix du billet - reduction real NOT NULL default 0, -- montant de la reduction obtenue + datec timestamp without time zone, + + dateo date, -- date operation + date_depart timestamp without time zone, -- date du voyage + date_arrivee timestamp without time zone, -- date du voyage + amount real NOT NULL DEFAULT 0, -- prix du billet + reduction real NOT NULL DEFAULT 0, -- montant de la reduction obtenue depart varchar(255), arrivee varchar(255), - fk_type smallint, -- Train, Avion, Bateaux + fk_type smallint, -- Train, Avion, Bateaux fk_reduc integer, - distance integer, -- distance en kilometre - dossier varchar(50), -- numero de dossier + distance integer, -- distance en kilometre + dossier varchar(50), -- numero de dossier 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); diff --git a/pgsql/tables/llx_voyage_reduc.sql b/pgsql/tables/llx_voyage_reduc.sql index 22e6b28b8c8..0b90e8845bb 100644 --- a/pgsql/tables/llx_voyage_reduc.sql +++ b/pgsql/tables/llx_voyage_reduc.sql @@ -25,11 +25,11 @@ create table llx_voyage_reduc ( rowid SERIAL PRIMARY KEY, - datec timestamp, + datec timestamp without time zone, datev date, -- date de valeur date_debut date, -- date operation date_fin date, - amount real NOT NULL default 0, + amount real NOT NULL DEFAULT 0, label varchar(255), numero varchar(255), fk_type smallint, -- Train, Avion, Bateaux