diff --git a/pgsql/tables/llx_adherent.sql b/pgsql/tables/llx_adherent.sql index 538d7e34c34..12e7e4ec5ab 100644 --- a/pgsql/tables/llx_adherent.sql +++ b/pgsql/tables/llx_adherent.sql @@ -31,7 +31,7 @@ create table llx_adherent statut smallint NOT NULL DEFAULT 0, 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 ('mor','phy')) NOT NULL, -- personne morale / personne physique + morphy CHAR(3) CHECK (morphy IN ('mor','phy')) NOT NULL, -- personne morale / personne physique datevalid timestamp, -- date de validation datec timestamp, -- date de creation prenom varchar(50), @@ -53,4 +53,4 @@ create table llx_adherent note text ); -CREATE UNIQUE INDEX llx_adherent_login ON llx_adherent (login); \ No newline at end of file +CREATE UNIQUE INDEX llx_adherent_login ON llx_adherent (login); diff --git a/pgsql/tables/llx_album.sql b/pgsql/tables/llx_album.sql index 4407ccbd3e7..ad3754ff491 100644 --- a/pgsql/tables/llx_album.sql +++ b/pgsql/tables/llx_album.sql @@ -25,9 +25,9 @@ create table llx_album rowid serial PRIMARY KEY, osc_id integer NOT NULL, tms timestamp, - ref varchar(12), - title varchar(64), - annee smallint, + ref varchar(12), + title varchar(64), + annee smallint, description text, collectif smallint, fk_user_author integer diff --git a/pgsql/tables/llx_cash_account.sql b/pgsql/tables/llx_cash_account.sql index 510f1d9d804..bc89048771b 100644 --- a/pgsql/tables/llx_cash_account.sql +++ b/pgsql/tables/llx_cash_account.sql @@ -28,7 +28,7 @@ create table llx_cash_account ( rowid SERIAL PRIMARY KEY, - datec datetime, + datec timestamp, tms timestamp, label varchar(30), courant smallint default 0 not null, diff --git a/pgsql/tables/llx_cotisation.sql b/pgsql/tables/llx_cotisation.sql index 25f0034b2d6..b99724e8c01 100644 --- a/pgsql/tables/llx_cotisation.sql +++ b/pgsql/tables/llx_cotisation.sql @@ -29,6 +29,6 @@ create table llx_cotisation fk_adherent integer, dateadh timestamp, cotisation real, - fk_bank int(11) default NULL, + fk_bank integer default NULL, note text ); diff --git a/pgsql/tables/llx_expeditiondet.sql b/pgsql/tables/llx_expeditiondet.sql index d8c3bf51c64..4103bc488a6 100644 --- a/pgsql/tables/llx_expeditiondet.sql +++ b/pgsql/tables/llx_expeditiondet.sql @@ -23,7 +23,7 @@ create table llx_expeditiondet ( - rowid integer AUTO_INCREMENT PRIMARY KEY, + rowid serial PRIMARY KEY, fk_expedition integer not null, fk_commande_ligne integer not null, qty real, -- quantité diff --git a/pgsql/tables/llx_facture_fourn.sql b/pgsql/tables/llx_facture_fourn.sql index 3f1c000fc4e..cbc5ed200e8 100644 --- a/pgsql/tables/llx_facture_fourn.sql +++ b/pgsql/tables/llx_facture_fourn.sql @@ -44,4 +44,4 @@ create table llx_facture_fourn note text ); -create unique index llx_facture_fourn_facnumber on llx_facture_fourn(facnumber, fksoc); +create unique index llx_facture_fourn_facnumber on llx_facture_fourn(facnumber, fk_soc); diff --git a/pgsql/tables/llx_societe.sql b/pgsql/tables/llx_societe.sql index 2cfd28efada..5977455b625 100644 --- a/pgsql/tables/llx_societe.sql +++ b/pgsql/tables/llx_societe.sql @@ -55,10 +55,10 @@ create table llx_societe services integer default 0, -- prefix_comm varchar(5), -- prefix commercial client smallint 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 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 ); create unique index llx_societe_prefix_comm on llx_societe(prefix_comm);