From cacc392b853c3428d7e052844b4d13ad3191881c Mon Sep 17 00:00:00 2001 From: opensides Date: Sat, 9 Oct 2004 10:47:16 +0000 Subject: [PATCH] nouvelle version des tables posgtresql beautification du code, tout les parametres en MAJUSCULES --- mysql/tables/llx_c_chargesociales.sql | 2 +- mysql/tables/llx_c_forme_juridique.sql | 2 +- mysql/tables/llx_c_paiement.sql | 2 +- mysql/tables/llx_c_pays.sql | 2 +- mysql/tables/llx_c_propalst.sql | 4 ++-- mysql/tables/llx_c_regions.sql | 2 +- mysql/tables/llx_c_typent.sql | 8 ++++---- mysql/tables/llx_commande.sql | 2 +- mysql/tables/llx_commandedet.sql | 8 ++++---- mysql/tables/llx_compta.sql | 4 ++-- mysql/tables/llx_cond_reglement.sql | 2 +- mysql/tables/llx_contrat.sql | 2 +- mysql/tables/llx_cotisation.sql | 2 +- mysql/tables/llx_deplacement.sql | 2 +- mysql/tables/llx_don.sql | 4 ++-- mysql/tables/llx_editeur.sql | 2 +- mysql/tables/llx_entrepot.sql | 2 +- mysql/tables/llx_expedition.sql | 2 +- mysql/tables/llx_expedition_methode.sql | 2 +- mysql/tables/llx_expeditiondet.sql | 4 ++-- pgsql/tables/llx_c_forme_juridique.sql | 6 +++--- pgsql/tables/llx_c_paiement.sql | 2 +- pgsql/tables/llx_c_pays.sql | 8 ++++---- pgsql/tables/llx_c_propalst.sql | 6 +++--- pgsql/tables/llx_c_regions.sql | 6 +++--- pgsql/tables/llx_c_stcomm.sql | 4 ++-- pgsql/tables/llx_c_typent.sql | 6 +++--- pgsql/tables/llx_chargesociales.sql | 8 ++------ pgsql/tables/llx_commande.sql | 8 ++++---- pgsql/tables/llx_commandedet.sql | 8 ++++---- pgsql/tables/llx_compta.sql | 4 ++-- pgsql/tables/llx_compta_account.sql | 2 +- pgsql/tables/llx_concert.sql | 4 ++-- pgsql/tables/llx_cond_reglement.sql | 2 +- pgsql/tables/llx_contrat.sql | 12 ++++++------ pgsql/tables/llx_cotisation.sql | 6 +++--- pgsql/tables/llx_deplacement.sql | 6 +++--- pgsql/tables/llx_domain.sql | 2 +- pgsql/tables/llx_don.sql | 8 ++++---- pgsql/tables/llx_don_projet.sql | 2 +- pgsql/tables/llx_editeur.sql | 2 +- pgsql/tables/llx_entrepot.sql | 4 ++-- pgsql/tables/llx_expedition.sql | 6 +++--- pgsql/tables/llx_expedition_methode.sql | 2 +- pgsql/tables/llx_expeditiondet.sql | 4 ++-- 45 files changed, 92 insertions(+), 96 deletions(-) diff --git a/mysql/tables/llx_c_chargesociales.sql b/mysql/tables/llx_c_chargesociales.sql index 0c3fcf560d9..228a2f93c0d 100644 --- a/mysql/tables/llx_c_chargesociales.sql +++ b/mysql/tables/llx_c_chargesociales.sql @@ -25,7 +25,7 @@ create table llx_c_chargesociales ( id integer PRIMARY KEY, libelle varchar(80), - deductible smallint NOT NULL DEFAULT 0, + deductible smallint DEFAULT 0 NOT NULL, active tinyint DEFAULT 1 NOT NULL )type=innodb; diff --git a/mysql/tables/llx_c_forme_juridique.sql b/mysql/tables/llx_c_forme_juridique.sql index 385ee39b8d3..c06a01b27ba 100644 --- a/mysql/tables/llx_c_forme_juridique.sql +++ b/mysql/tables/llx_c_forme_juridique.sql @@ -27,7 +27,7 @@ create table llx_c_forme_juridique code varchar(12) UNIQUE NOT NULL, fk_pays integer NOT NULL, libelle varchar(255), - active tinyint default 1 NOT NULL + active tinyint DEFAULT 1 NOT NULL )type=innodb; diff --git a/mysql/tables/llx_c_paiement.sql b/mysql/tables/llx_c_paiement.sql index 11ad6969900..d38df322ee5 100644 --- a/mysql/tables/llx_c_paiement.sql +++ b/mysql/tables/llx_c_paiement.sql @@ -33,7 +33,7 @@ create table llx_c_paiement code varchar(6) UNIQUE NOT NULL, libelle varchar(30), type smallint, - active tinyint default 1 NOT NULL + active tinyint DEFAULT 1 NOT NULL )type=innodb; diff --git a/mysql/tables/llx_c_pays.sql b/mysql/tables/llx_c_pays.sql index d06772b7586..cdbbd83721a 100644 --- a/mysql/tables/llx_c_pays.sql +++ b/mysql/tables/llx_c_pays.sql @@ -26,7 +26,7 @@ create table llx_c_pays rowid integer PRIMARY KEY, code varchar(6) UNIQUE NOT NULL, libelle varchar(25) NOT NULL, - active tinyint default 1 NOT NULL + active tinyint DEFAULT 1 NOT NULL )type=innodb; diff --git a/mysql/tables/llx_c_propalst.sql b/mysql/tables/llx_c_propalst.sql index 105951a9294..2a58989deda 100644 --- a/mysql/tables/llx_c_propalst.sql +++ b/mysql/tables/llx_c_propalst.sql @@ -24,8 +24,8 @@ create table llx_c_propalst ( id smallint PRIMARY KEY, - code varchar(12) UNIQUE NOT NULL, + code varchar(12) UNIQUE NOT NULL, label varchar(30), - active tinyint default 1 NOT NULL + active tinyint DEFAULT 1 NOT NULL )type=innodb; diff --git a/mysql/tables/llx_c_regions.sql b/mysql/tables/llx_c_regions.sql index fea5259ca76..d6118964e32 100644 --- a/mysql/tables/llx_c_regions.sql +++ b/mysql/tables/llx_c_regions.sql @@ -29,6 +29,6 @@ create table llx_c_regions cheflieu varchar(7), tncc integer, nom varchar(50), - active tinyint default 1 NOT NULL + active tinyint DEFAULT 1 NOT NULL )type=innodb; diff --git a/mysql/tables/llx_c_typent.sql b/mysql/tables/llx_c_typent.sql index 31b96d19ef8..7866f0724f4 100644 --- a/mysql/tables/llx_c_typent.sql +++ b/mysql/tables/llx_c_typent.sql @@ -2,9 +2,6 @@ -- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville -- Copyright (C) 2004 Laurent Destailleur -- --- $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 @@ -19,6 +16,9 @@ -- 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_c_typent @@ -26,5 +26,5 @@ create table llx_c_typent 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; diff --git a/mysql/tables/llx_commande.sql b/mysql/tables/llx_commande.sql index 228d225678c..bd8364a71d1 100644 --- a/mysql/tables/llx_commande.sql +++ b/mysql/tables/llx_commande.sql @@ -26,7 +26,7 @@ create table llx_commande tms timestamp, fk_soc 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 date_creation datetime, -- date de creation date_valid datetime, -- date de validation diff --git a/mysql/tables/llx_commandedet.sql b/mysql/tables/llx_commandedet.sql index f44d869846b..4c313194423 100644 --- a/mysql/tables/llx_commandedet.sql +++ b/mysql/tables/llx_commandedet.sql @@ -26,10 +26,10 @@ create table llx_commandedet fk_product integer, label varchar(255), description text, - tva_tx real default 19.6, -- taux tva - qty real, -- quantité - remise_percent real default 0, -- pourcentage de remise - remise real default 0, -- montant de la remise + tva_tx real DEFAULT 19.6, -- taux tva + qty real, -- quantité + remise_percent real DEFAULT 0, -- pourcentage de remise + remise real DEFAULT 0, -- montant de la remise subprice real, -- prix avant remise price real -- prix final )type=innodb; diff --git a/mysql/tables/llx_compta.sql b/mysql/tables/llx_compta.sql index 6386d7b64d4..aa10dff2e81 100644 --- a/mysql/tables/llx_compta.sql +++ b/mysql/tables/llx_compta.sql @@ -25,12 +25,12 @@ create table llx_compta rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime, datev date, -- date de valeur - amount real NOT NULL default 0, + amount real DEFAULT 0 NOT NULL , label varchar(255), fk_compta_account integer, fk_user_author integer, fk_user_valid integer, - valid tinyint default 0, + valid tinyint DEFAULT 0, note text )type=innodb; diff --git a/mysql/tables/llx_cond_reglement.sql b/mysql/tables/llx_cond_reglement.sql index 14dbff02b5b..2d0b6900a1a 100644 --- a/mysql/tables/llx_cond_reglement.sql +++ b/mysql/tables/llx_cond_reglement.sql @@ -24,7 +24,7 @@ create table llx_cond_reglement ( rowid integer PRIMARY KEY, sortorder smallint, - actif tinyint default 1, + actif tinyint DEFAULT 1, libelle varchar(255), libelle_facture text, fdm tinyint, -- reglement fin de mois diff --git a/mysql/tables/llx_contrat.sql b/mysql/tables/llx_contrat.sql index 566891f1471..9b54de751e3 100644 --- a/mysql/tables/llx_contrat.sql +++ b/mysql/tables/llx_contrat.sql @@ -25,7 +25,7 @@ create table llx_contrat ( rowid integer AUTO_INCREMENT PRIMARY KEY, tms timestamp, - enservice smallint default 0, + enservice smallint DEFAULT 0, mise_en_service datetime, fin_validite datetime, date_cloture datetime, diff --git a/mysql/tables/llx_cotisation.sql b/mysql/tables/llx_cotisation.sql index 2f2448577fd..06983d356ff 100644 --- a/mysql/tables/llx_cotisation.sql +++ b/mysql/tables/llx_cotisation.sql @@ -27,6 +27,6 @@ create table llx_cotisation fk_adherent integer, dateadh datetime, cotisation real, - fk_bank int(11) default NULL, + fk_bank int(11) DEFAULT NULL, note text )type=innodb; diff --git a/mysql/tables/llx_deplacement.sql b/mysql/tables/llx_deplacement.sql index 26cdebbfcc0..4731829afef 100644 --- a/mysql/tables/llx_deplacement.sql +++ b/mysql/tables/llx_deplacement.sql @@ -26,7 +26,7 @@ create table llx_deplacement datec datetime NOT NULL, tms timestamp, dated datetime, - fk_user integer NOT NULL, + fk_user integer NOT NULL, fk_user_author integer, type smallint NOT NULL, km smallint, diff --git a/mysql/tables/llx_don.sql b/mysql/tables/llx_don.sql index 5ae43faf2c0..ddc2f5cf677 100644 --- a/mysql/tables/llx_don.sql +++ b/mysql/tables/llx_don.sql @@ -27,7 +27,7 @@ create table llx_don fk_statut smallint NOT NULL DEFAULT 0,-- etat du don promesse/valid datec datetime, -- date de création de l'enregistrement datedon datetime, -- date du don/promesse - amount real default 0, + amount real DEFAULT 0, fk_paiement integer, prenom varchar(50), nom varchar(50), @@ -37,7 +37,7 @@ create table llx_don ville varchar(50), pays varchar(50), email varchar(255), - public smallint NOT NULL DEFAULT 1, -- le don est-il public (0,1) + public smallint DEFAULT 1 NOT NULL, -- le don est-il public (0,1) fk_don_projet integer NOT NULL, -- projet auquel est fait le don fk_user_author integer NOT NULL, fk_user_valid integer NOT NULL, diff --git a/mysql/tables/llx_editeur.sql b/mysql/tables/llx_editeur.sql index fa3ad2e330e..32f9ccaeb52 100644 --- a/mysql/tables/llx_editeur.sql +++ b/mysql/tables/llx_editeur.sql @@ -25,7 +25,7 @@ create table llx_editeur rowid integer AUTO_INCREMENT PRIMARY KEY, oscid integer NOT NULL, tms timestamp, - nom varchar(255), + nom varchar(255), fk_user_author integer )type=innodb; diff --git a/mysql/tables/llx_entrepot.sql b/mysql/tables/llx_entrepot.sql index a20e5321329..246436b9d0a 100644 --- a/mysql/tables/llx_entrepot.sql +++ b/mysql/tables/llx_entrepot.sql @@ -28,7 +28,7 @@ create table llx_entrepot tms timestamp, label varchar(255) NOT NULL, description text, - statut tinyint default 1, -- 1 ouvert, 0 fermé + statut tinyint DEFAULT 1, -- 1 ouvert, 0 fermé fk_user_author integer )type=innodb; diff --git a/mysql/tables/llx_expedition.sql b/mysql/tables/llx_expedition.sql index 364affd026a..0de7fbe769e 100644 --- a/mysql/tables/llx_expedition.sql +++ b/mysql/tables/llx_expedition.sql @@ -33,7 +33,7 @@ create table llx_expedition fk_user_valid integer, -- valideur fk_entrepot integer, fk_expedition_methode integer, - fk_statut smallint default 0, + fk_statut smallint DEFAULT 0, note text, model_pdf varchar(50), diff --git a/mysql/tables/llx_expedition_methode.sql b/mysql/tables/llx_expedition_methode.sql index 120fd0ebe85..079a5f68817 100644 --- a/mysql/tables/llx_expedition_methode.sql +++ b/mysql/tables/llx_expedition_methode.sql @@ -27,5 +27,5 @@ create table llx_expedition_methode code varchar(30) NOT NULL, libelle varchar(50) NOT NULL, description text, - statut tinyint default 0 + statut tinyint DEFAULT 0 )type=innodb; diff --git a/mysql/tables/llx_expeditiondet.sql b/mysql/tables/llx_expeditiondet.sql index 4e6851f41ad..e0a2154decc 100644 --- a/mysql/tables/llx_expeditiondet.sql +++ b/mysql/tables/llx_expeditiondet.sql @@ -22,8 +22,8 @@ create table llx_expeditiondet ( rowid integer AUTO_INCREMENT PRIMARY KEY, - fk_expedition integer not null, - fk_commande_ligne integer not null, + fk_expedition integer NOT NULL, + fk_commande_ligne integer NOT NULL, qty real, -- quantité key(fk_expedition), diff --git a/pgsql/tables/llx_c_forme_juridique.sql b/pgsql/tables/llx_c_forme_juridique.sql index e2063a5cd54..2a947e7d95d 100644 --- a/pgsql/tables/llx_c_forme_juridique.sql +++ b/pgsql/tables/llx_c_forme_juridique.sql @@ -24,9 +24,9 @@ create table llx_c_forme_juridique ( rowid serial PRIMARY KEY, - code varchar(12) unique not null, - fk_pays integer not null, + code varchar(12) UNIQUE NOT NULL, + fk_pays integer NOT NULL, libelle varchar(255), - active smallint default 1 not null + active smallint DEFAULT 1 NOT NULL ); diff --git a/pgsql/tables/llx_c_paiement.sql b/pgsql/tables/llx_c_paiement.sql index adba6be39fb..43ea28e4c99 100644 --- a/pgsql/tables/llx_c_paiement.sql +++ b/pgsql/tables/llx_c_paiement.sql @@ -35,7 +35,7 @@ create table llx_c_paiement code varchar(6), libelle varchar(30), type smallint, - active smallint default 1 not null + active smallint DEFAULT 1 not null ); diff --git a/pgsql/tables/llx_c_pays.sql b/pgsql/tables/llx_c_pays.sql index 7aef466057a..9945c4c98b7 100644 --- a/pgsql/tables/llx_c_pays.sql +++ b/pgsql/tables/llx_c_pays.sql @@ -22,10 +22,10 @@ create table llx_c_pays ( - rowid SERIAL PRIMARY KEY, - code varchar(6) unique not null, - libelle varchar(25) not null, - active smallint default 1 NOT NULL + rowid SERIAL PRIMARY KEY, + code varchar(6) UNIQUE NOT NULL, + libelle varchar(25) NOT NULL, + active smallint DEFAULT 1 NOT NULL ); diff --git a/pgsql/tables/llx_c_propalst.sql b/pgsql/tables/llx_c_propalst.sql index 295be0e5255..4624879753d 100644 --- a/pgsql/tables/llx_c_propalst.sql +++ b/pgsql/tables/llx_c_propalst.sql @@ -22,9 +22,9 @@ create table llx_c_propalst ( - id SERIAL PRIMARY KEY, - code varchar(12) unique not null, + id SERIAL PRIMARY KEY, + code varchar(12) UNIQUE NOT NULL, label varchar(30), - active integer default 1 not null + active integer DEFAULT 1 NOT NULL ); diff --git a/pgsql/tables/llx_c_regions.sql b/pgsql/tables/llx_c_regions.sql index 759c8f07b6a..2236a1a0a49 100644 --- a/pgsql/tables/llx_c_regions.sql +++ b/pgsql/tables/llx_c_regions.sql @@ -23,9 +23,9 @@ create table llx_c_regions ( - rowid serial PRIMARY KEY, - code_region integer UNIQUE NOT NULL, - fk_pays integer NOT NULL, + rowid serial PRIMARY KEY, + code_region integer UNIQUE NOT NULL, + fk_pays integer NOT NULL, cheflieu varchar(7), tncc integer, nom varchar(50), diff --git a/pgsql/tables/llx_c_stcomm.sql b/pgsql/tables/llx_c_stcomm.sql index 991f5c63a76..63b7f1627a6 100644 --- a/pgsql/tables/llx_c_stcomm.sql +++ b/pgsql/tables/llx_c_stcomm.sql @@ -23,8 +23,8 @@ create table llx_c_stcomm ( id SERIAL PRIMARY KEY, - code varchar(12) unique not null, + code varchar(12) UNIQUE NOT NULL, libelle varchar(30), - active smallint default 1 not null + active smallint DEFAULT 1 NOT NULL ); diff --git a/pgsql/tables/llx_c_typent.sql b/pgsql/tables/llx_c_typent.sql index cd73ff00cd1..f1a508f7f11 100644 --- a/pgsql/tables/llx_c_typent.sql +++ b/pgsql/tables/llx_c_typent.sql @@ -22,8 +22,8 @@ create table llx_c_typent ( - id SERIAL PRIMARY KEY, - code varchar(12) unique not null, + id SERIAL PRIMARY KEY, + code varchar(12) UNIQUE NOT NULL, libelle varchar(30), - active smallint default 1 not null + active smallint DEFAULT 1 NOT NULL ); diff --git a/pgsql/tables/llx_chargesociales.sql b/pgsql/tables/llx_chargesociales.sql index 5ca78ad8b2d..db118f3d213 100644 --- a/pgsql/tables/llx_chargesociales.sql +++ b/pgsql/tables/llx_chargesociales.sql @@ -25,13 +25,9 @@ create table llx_chargesociales ( rowid SERIAL PRIMARY KEY, - date_ech timestamp NOT NULL, -- date d'echeance - date_pai timestamp, -- date de paiements libelle varchar(80), - fk_type integer, - amount real default 0 NOT NULL, - paye smallint default 0 NOT NULL, - periode date + deductible smallint DEFAULT 0 NOT NULL, + active smallint DEFAULT 0 NOT NULL ); diff --git a/pgsql/tables/llx_commande.sql b/pgsql/tables/llx_commande.sql index fabd3fce247..4ca6587a1b9 100644 --- a/pgsql/tables/llx_commande.sql +++ b/pgsql/tables/llx_commande.sql @@ -27,11 +27,11 @@ create table llx_commande tms timestamp, fk_soc 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 - date_creation timestamp, -- date de creation - date_valid timestamp, -- date de validation - date_cloture timestamp, -- date de cloture + date_creation timestamp without time zone, -- date de creation + date_valid timestamp without time zone, -- date de validation + date_cloture timestamp without time zone, -- date de cloture date_commande date, -- date de la commande fk_user_author integer, -- createur de la commande fk_user_valid integer, -- valideur de la commande diff --git a/pgsql/tables/llx_commandedet.sql b/pgsql/tables/llx_commandedet.sql index 8321c943b05..e8dca6f87d8 100644 --- a/pgsql/tables/llx_commandedet.sql +++ b/pgsql/tables/llx_commandedet.sql @@ -28,10 +28,10 @@ create table llx_commandedet fk_product integer, label varchar(255), description text, - tva_tx real default 19.6, -- taux tva - qty real, -- quantité - remise_percent real default 0, -- pourcentage de remise - remise real default 0, -- montant de la remise + tva_tx real DEFAULT 19.6, -- taux tva + qty real, -- quantité + remise_percent real DEFAULT 0, -- pourcentage de remise + remise real DEFAULT 0, -- montant de la remise subprice real, -- prix avant remise price real -- prix final ); diff --git a/pgsql/tables/llx_compta.sql b/pgsql/tables/llx_compta.sql index d4f64d928e6..def3fb08361 100644 --- a/pgsql/tables/llx_compta.sql +++ b/pgsql/tables/llx_compta.sql @@ -26,9 +26,9 @@ create table llx_compta ( rowid SERIAL PRIMARY KEY, - datec timestamp, + datec timestamp without time zone, datev date, -- date de valeur - amount real NOT NULL default 0, + amount real DEFAULT 0 NOT NULL, label varchar(255), fk_compta_account integer, fk_user_author integer, diff --git a/pgsql/tables/llx_compta_account.sql b/pgsql/tables/llx_compta_account.sql index 473e16a9780..0e20a17a62c 100644 --- a/pgsql/tables/llx_compta_account.sql +++ b/pgsql/tables/llx_compta_account.sql @@ -26,7 +26,7 @@ create table llx_compta_account ( rowid SERIAL PRIMARY KEY, - datec timestamp, + datec timestamp without time zone, number varchar(12), label varchar(255), fk_user_author integer, diff --git a/pgsql/tables/llx_concert.sql b/pgsql/tables/llx_concert.sql index 32c41844773..c9b8adefb74 100644 --- a/pgsql/tables/llx_concert.sql +++ b/pgsql/tables/llx_concert.sql @@ -25,9 +25,9 @@ create table llx_concert ( rowid SERIAL PRIMARY KEY, tms timestamp, - date_concert timestamp, + date_concert timestamp without time zone NOT NULL, description text, - collectif int DEFAULT 0 NOT NULL, + collectif smallint DEFAULT 0 NOT NULL, fk_groupart integer, fk_lieu_concert integer, fk_user_author integer diff --git a/pgsql/tables/llx_cond_reglement.sql b/pgsql/tables/llx_cond_reglement.sql index 2fa4bcb5e3e..ecafd0a2077 100644 --- a/pgsql/tables/llx_cond_reglement.sql +++ b/pgsql/tables/llx_cond_reglement.sql @@ -25,7 +25,7 @@ create table llx_cond_reglement ( rowid SERIAL PRIMARY KEY, sortorder smallint, - actif int default 1, + actif smallint DEFAULT 1, libelle varchar(255), libelle_facture text, fdm smallint, -- reglement fin de mois diff --git a/pgsql/tables/llx_contrat.sql b/pgsql/tables/llx_contrat.sql index acbf05fb5df..2fa873c707b 100644 --- a/pgsql/tables/llx_contrat.sql +++ b/pgsql/tables/llx_contrat.sql @@ -25,14 +25,14 @@ create table llx_contrat ( rowid SERIAL PRIMARY KEY, tms timestamp, - enservice smallint default 0, - mise_en_service timestamp, - fin_validite timestamp, - date_cloture timestamp, + enservice smallint DEFAULT 0, + mise_en_service timestamp without time zone, + fin_validite timestamp without time zone, + date_cloture timestamp without time zone, fk_soc integer NOT NULL, fk_product integer NOT NULL, - fk_facture integer NOT NULL default 0, - fk_facturedet integer NOT NULL default 0, + fk_facture integer NOT NULL DEFAULT 0, + fk_facturedet integer NOT NULL DEFAULT 0, fk_user_author integer NOT NULL, fk_user_mise_en_service integer, fk_user_cloture integer diff --git a/pgsql/tables/llx_cotisation.sql b/pgsql/tables/llx_cotisation.sql index b99724e8c01..09d28158e3d 100644 --- a/pgsql/tables/llx_cotisation.sql +++ b/pgsql/tables/llx_cotisation.sql @@ -25,10 +25,10 @@ create table llx_cotisation ( rowid SERIAL PRIMARY KEY, tms timestamp, - datec timestamp, + datec timestamp without time zone, fk_adherent integer, - dateadh timestamp, + dateadh timestamp without time zone, cotisation real, - fk_bank integer default NULL, + fk_bank integer DEFAULT NULL, note text ); diff --git a/pgsql/tables/llx_deplacement.sql b/pgsql/tables/llx_deplacement.sql index d017e47638b..1a9027538b0 100644 --- a/pgsql/tables/llx_deplacement.sql +++ b/pgsql/tables/llx_deplacement.sql @@ -24,10 +24,10 @@ create table llx_deplacement ( rowid SERIAL PRIMARY KEY, - datec timestamp, + datec timestamp without time zone NOT NULL, tms timestamp, - dated timestamp, - fk_user integer NOT NULL, + dated timestamp without time zone, + fk_user integer NOT NULL, fk_user_author integer, type smallint NOT NULL, km smallint, diff --git a/pgsql/tables/llx_domain.sql b/pgsql/tables/llx_domain.sql index 70a208a2e46..8533dc9aa5d 100644 --- a/pgsql/tables/llx_domain.sql +++ b/pgsql/tables/llx_domain.sql @@ -25,7 +25,7 @@ create table llx_domain ( rowid SERIAL PRIMARY KEY, - datec timestamp, + datec timestamp without time zone, label varchar(255), note text ); diff --git a/pgsql/tables/llx_don.sql b/pgsql/tables/llx_don.sql index e0d44d2203b..ce7b6051fb3 100644 --- a/pgsql/tables/llx_don.sql +++ b/pgsql/tables/llx_don.sql @@ -26,9 +26,9 @@ create table llx_don rowid SERIAL PRIMARY KEY, tms timestamp, fk_statut smallint NOT NULL DEFAULT 0,-- etat du don promesse/valid - datec timestamp, -- date de création de l'enregistrement - datedon timestamp, -- date du don/promesse - amount real default 0, + datec timestamp without time zone, -- date de création de l'enregistrement + datedon timestamp without time zone, -- date du don/promesse + amount real DEFAULT 0, fk_paiement integer, prenom varchar(50), nom varchar(50), @@ -38,7 +38,7 @@ create table llx_don ville varchar(50), pays varchar(50), email varchar(255), - public smallint NOT NULL DEFAULT 1, -- le don est-il public (0,1) + public smallint DEFAULT 1 NOT NULL, -- le don est-il public (0,1) fk_don_projet integer NOT NULL, -- projet auquel est fait le don fk_user_author integer NOT NULL, fk_user_valid integer NOT NULL, diff --git a/pgsql/tables/llx_don_projet.sql b/pgsql/tables/llx_don_projet.sql index 3f7e0302ae1..ad0a9995ade 100644 --- a/pgsql/tables/llx_don_projet.sql +++ b/pgsql/tables/llx_don_projet.sql @@ -25,7 +25,7 @@ create table llx_don_projet ( rowid SERIAL PRIMARY KEY, tms timestamp, - datec timestamp, + datec timestamp without time zone, libelle varchar(255), fk_user_author integer NOT NULL, note text diff --git a/pgsql/tables/llx_editeur.sql b/pgsql/tables/llx_editeur.sql index 1942a667cdf..b2e4212f46c 100644 --- a/pgsql/tables/llx_editeur.sql +++ b/pgsql/tables/llx_editeur.sql @@ -26,7 +26,7 @@ create table llx_editeur rowid SERIAL PRIMARY KEY, oscid integer NOT NULL, tms timestamp, - nom varchar(255), + nom varchar(255), fk_user_author integer ); diff --git a/pgsql/tables/llx_entrepot.sql b/pgsql/tables/llx_entrepot.sql index 27fc2e51e8f..eca33a44b3d 100644 --- a/pgsql/tables/llx_entrepot.sql +++ b/pgsql/tables/llx_entrepot.sql @@ -24,11 +24,11 @@ create table llx_entrepot ( rowid SERIAL PRIMARY KEY, - datec timestamp, + datec timestamp without time zone, tms timestamp, label varchar(255) NOT NULL, description text, - statut smallint default 1, -- 1 ouvert, 0 fermé + statut smallint DEFAULT 1, -- 1 ouvert, 0 fermé fk_user_author integer ); diff --git a/pgsql/tables/llx_expedition.sql b/pgsql/tables/llx_expedition.sql index e4722e7eb2a..2402e67f228 100644 --- a/pgsql/tables/llx_expedition.sql +++ b/pgsql/tables/llx_expedition.sql @@ -27,14 +27,14 @@ create table llx_expedition tms timestamp, ref varchar(30) NOT NULL, fk_commande integer, - date_creation timestamp, -- date de creation - date_valid timestamp, -- date de validation + date_creation timestamp without time zone, -- date de creation + date_valid timestamp without time zone, -- date de validation date_expedition date, -- date de l'expedition fk_user_author integer, -- createur fk_user_valid integer, -- valideur fk_entrepot integer, fk_expedition_methode integer, - fk_statut smallint default 0, + fk_statut smallint DEFAULT 0, note text, model_pdf varchar(50), diff --git a/pgsql/tables/llx_expedition_methode.sql b/pgsql/tables/llx_expedition_methode.sql index 5bcaf002d5e..e65df216a90 100644 --- a/pgsql/tables/llx_expedition_methode.sql +++ b/pgsql/tables/llx_expedition_methode.sql @@ -28,5 +28,5 @@ create table llx_expedition_methode code varchar(30) NOT NULL, libelle varchar(50) NOT NULL, description text, - statut smallint default 0 + statut smallint DEFAULT 0 ); diff --git a/pgsql/tables/llx_expeditiondet.sql b/pgsql/tables/llx_expeditiondet.sql index c97718ca2fa..5979d64db5b 100644 --- a/pgsql/tables/llx_expeditiondet.sql +++ b/pgsql/tables/llx_expeditiondet.sql @@ -24,8 +24,8 @@ create table llx_expeditiondet ( rowid serial PRIMARY KEY, - fk_expedition integer not null, - fk_commande_ligne integer not null, + fk_expedition integer NOT NULL, + fk_commande_ligne integer NOT NULL, qty real -- quantité );