From 04c060869d176b8c5577d1e13416bd1d21cfdcbd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 9 Apr 2005 14:37:39 +0000 Subject: [PATCH] Mise a jour sql pour postgres --- pgsql/tables/llx_actioncomm.sql | 2 +- .../llx_c_methode_commande_fournisseur.sql | 10 ++++-- pgsql/tables/llx_dolibarr_modules.sql | 36 +++++++++++++++++++ pgsql/tables/llx_facture.sql | 2 +- 4 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 pgsql/tables/llx_dolibarr_modules.sql diff --git a/pgsql/tables/llx_actioncomm.sql b/pgsql/tables/llx_actioncomm.sql index 71379281bfb..ea20cc38ac1 100644 --- a/pgsql/tables/llx_actioncomm.sql +++ b/pgsql/tables/llx_actioncomm.sql @@ -37,7 +37,7 @@ create table llx_actioncomm "fk_user_action" integer, -- id de la personne qui doit effectuer l'action "fk_user_author" integer, "priority" smallint, - "percent" smallint, + "percent" smallint NOT NULL default 0, "note" text, "propalrowid" integer, "fk_facture" integer diff --git a/pgsql/tables/llx_c_methode_commande_fournisseur.sql b/pgsql/tables/llx_c_methode_commande_fournisseur.sql index 1d4e4a0300b..d41af24eda4 100644 --- a/pgsql/tables/llx_c_methode_commande_fournisseur.sql +++ b/pgsql/tables/llx_c_methode_commande_fournisseur.sql @@ -3,7 +3,7 @@ -- (c) 2005, Laurent Destailleur. -- ======================================================================== --- Copyright (C) 2004 Rodolphe Quiedeville +-- Copyright (C) 2004-2005 Rodolphe Quiedeville -- Copyright (C) 2005 Laurent Destailleur -- -- $Id$ @@ -25,11 +25,15 @@ -- -- ======================================================================== + create table llx_c_methode_commande_fournisseur ( rowid SERIAL PRIMARY KEY, "code" varchar(30), - "libelle" varchar(30), - "active" smallint default 1 NOT NULL + "libelle" varchar(60), + "active" smallint default 1 NOT NULL, + UNIQUE(code) ); +CREATE INDEX idx_llx_c_methode_commande_fournisseur_code ON llx_c_methode_commande_fournisseur (code); + diff --git a/pgsql/tables/llx_dolibarr_modules.sql b/pgsql/tables/llx_dolibarr_modules.sql new file mode 100644 index 00000000000..1f7298bdf20 --- /dev/null +++ b/pgsql/tables/llx_dolibarr_modules.sql @@ -0,0 +1,36 @@ +-- Generated from dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_dolibarr_modules +( + numero integer PRIMARY KEY, + "active" smallint DEFAULT 0 NOT NULL, + "active_date" timestamp NOT NULL, + "active_version" varchar(25) NOT NULL +); + + diff --git a/pgsql/tables/llx_facture.sql b/pgsql/tables/llx_facture.sql index 9c8c826e9ab..ac580ac5335 100644 --- a/pgsql/tables/llx_facture.sql +++ b/pgsql/tables/llx_facture.sql @@ -45,7 +45,7 @@ create table llx_facture "fk_user_author" integer, -- createur de la propale "fk_user_valid" integer, -- valideur de la propale "fk_projet" integer, -- projet auquel est associé la facture - "fk_cond_reglement" integer, -- condition de reglement (30 jours, fin de mois ...) + "fk_cond_reglement" integer DEFAULT 1 NOT NULL, -- condition de reglement (30 jours, fin de mois ...) "fk_mode_reglement" integer, -- mode de reglement (Virement, Prélèvement) "date_lim_reglement" date, -- date limite de reglement "note" text,