diff --git a/pgsql/tables/llx_adherent.sql b/pgsql/tables/llx_adherent.sql index af2e986bd7f..538d7e34c34 100644 --- a/pgsql/tables/llx_adherent.sql +++ b/pgsql/tables/llx_adherent.sql @@ -53,3 +53,4 @@ create table llx_adherent note text ); +CREATE UNIQUE INDEX llx_adherent_login ON llx_adherent (login); \ No newline at end of file diff --git a/pgsql/tables/llx_c_paiement.sql b/pgsql/tables/llx_c_paiement.sql index a46d82ab362..52cf9e16a2e 100644 --- a/pgsql/tables/llx_c_paiement.sql +++ b/pgsql/tables/llx_c_paiement.sql @@ -32,6 +32,7 @@ create table llx_c_paiement ( id SERIAL PRIMARY KEY, + code varchar(6), libelle varchar(30), type smallint ); diff --git a/pgsql/tables/llx_c_pays.sql b/pgsql/tables/llx_c_pays.sql index 127895663cd..30067054ed3 100644 --- a/pgsql/tables/llx_c_pays.sql +++ b/pgsql/tables/llx_c_pays.sql @@ -22,7 +22,7 @@ create table llx_c_pays ( - id SERIAL PRIMARY KEY, + rowid SERIAL PRIMARY KEY, libelle varchar(25), code char(2) NOT NULL, active smallint default 1 NOT NULL diff --git a/pgsql/tables/llx_contrat.sql b/pgsql/tables/llx_contrat.sql index 11f55bf100f..acbf05fb5df 100644 --- a/pgsql/tables/llx_contrat.sql +++ b/pgsql/tables/llx_contrat.sql @@ -34,7 +34,7 @@ create table llx_contrat 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 NOT NULL, - fk_user_cloture integer NOT NULL + fk_user_mise_en_service integer, + fk_user_cloture integer ); diff --git a/pgsql/tables/llx_entrepot.sql b/pgsql/tables/llx_entrepot.sql index bdb3f37ddbd..27fc2e51e8f 100644 --- a/pgsql/tables/llx_entrepot.sql +++ b/pgsql/tables/llx_entrepot.sql @@ -26,9 +26,9 @@ create table llx_entrepot rowid SERIAL PRIMARY KEY, datec timestamp, tms timestamp, - label varchar(255), + label varchar(255) NOT NULL, description text, - statut tinyint default 1, -- 1 ouvert, 0 fermé + statut smallint default 1, -- 1 ouvert, 0 fermé fk_user_author integer ); diff --git a/pgsql/tables/llx_facturedet.sql b/pgsql/tables/llx_facturedet.sql index a2e18f753e5..11dae90f513 100644 --- a/pgsql/tables/llx_facturedet.sql +++ b/pgsql/tables/llx_facturedet.sql @@ -29,7 +29,7 @@ create table llx_facturedet fk_product integer NOT NULL DEFAULT 0, description text, tva_taux real default 19.6, -- taux tva - qty real, -- quantité + qty real, -- quantité remise_percent real default 0, -- pourcentage de remise remise real default 0, -- montant de la remise subprice real, -- prix avant remise