Mise a jour script postgresql
This commit is contained in:
parent
c7b8f5e6a4
commit
43329f7ec5
@ -1,77 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
||||||
# Copyright (C) 2002-2003 Éric Seigne <erics@rycks.com>
|
|
||||||
# Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
||||||
#
|
|
||||||
# $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
|
|
||||||
# (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.
|
|
||||||
#
|
|
||||||
SQL=psql
|
|
||||||
BASE=dolibarr
|
|
||||||
OWNER=dolibarradm
|
|
||||||
OPTIONS=-U $(OWNER)
|
|
||||||
|
|
||||||
all: show
|
|
||||||
|
|
||||||
create:
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < actioncomm.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < c_actioncomm.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < c_chargesociales.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < c_effectif.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < c_paiement.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < c_pays.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < c_propalst.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < c_stcomm.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < c_typent.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_adherent.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_bank.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_bank_account.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_bank_categ.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_bank_class.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_bookmark.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_chargesociales.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_compta.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_compta_account.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_cotisation.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_don.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_don_projet.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_fa_pr.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_facture.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_facture_fourn.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_fichinter.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_paiement.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_pointmort.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_product.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_projet.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_propal.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_propaldet.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_service.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_soc_recontact.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_tva.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_user.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_ventes.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_voyage.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < llx_voyage_reduc.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < societe.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < socpeople.sql
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < socstatutlog.sql
|
|
||||||
|
|
||||||
drop:
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) < drop.sql
|
|
||||||
|
|
||||||
show:
|
|
||||||
$(SQL) $(OPTIONS) $(BASE) -c '\d'
|
|
||||||
31
pgsql/tables/llx_accountingaccount.key.sql
Normal file
31
pgsql/tables/llx_accountingaccount.key.sql
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- 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$
|
||||||
|
-- ===========================================================================
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_accountingaccount ADD INDEX idx_accountingaccount_fk_pcg_version (fk_pcg_version);
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_accountingaccount ADD CONSTRAINT fk_accountingaccount_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accountingsystem (pcg_version);
|
||||||
@ -3,7 +3,7 @@
|
|||||||
-- (c) 2005, Laurent Destailleur.
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -21,10 +21,9 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
|
|
||||||
create table llx_accountingsystem_det
|
create table llx_accountingaccount
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_pcg_version" varchar(12) NOT NULL,
|
"fk_pcg_version" varchar(12) NOT NULL,
|
||||||
@ -3,7 +3,7 @@
|
|||||||
-- (c) 2005, Laurent Destailleur.
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -21,14 +21,12 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
|
|
||||||
create table llx_auteur
|
create table llx_accountingdebcred
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
"fk_transaction" integer NOT NULL,
|
||||||
"oscid" integer NOT NULL,
|
"fk_account" integer NOT NULL,
|
||||||
"tms" timestamp,
|
"amount" real NOT NULL,
|
||||||
"nom" varchar(255),
|
"direction" varchar(1) NOT NULL
|
||||||
"fk_user_author" integer
|
|
||||||
);
|
);
|
||||||
@ -3,7 +3,7 @@
|
|||||||
-- (c) 2005, Laurent Destailleur.
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -21,7 +21,6 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
|
|
||||||
create table llx_accountingsystem
|
create table llx_accountingsystem
|
||||||
|
|||||||
37
pgsql/tables/llx_accountingtransaction.sql
Normal file
37
pgsql/tables/llx_accountingtransaction.sql
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- 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_accountingtransaction
|
||||||
|
(
|
||||||
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"label" varchar(128) NOT NULL,
|
||||||
|
"datec" date NOT NULL,
|
||||||
|
"fk_author" varchar(20) NOT NULL,
|
||||||
|
"tms" timestamp,
|
||||||
|
"fk_facture" integer,
|
||||||
|
"fk_facture_fourn" integer,
|
||||||
|
"fk_paiement" integer,
|
||||||
|
"fk_paiement_fourn" integer
|
||||||
|
);
|
||||||
@ -30,7 +30,10 @@
|
|||||||
create table llx_actioncomm
|
create table llx_actioncomm
|
||||||
(
|
(
|
||||||
id SERIAL PRIMARY KEY,
|
id SERIAL PRIMARY KEY,
|
||||||
"datea" timestamp, -- action date
|
"datec" timestamp, -- date creation
|
||||||
|
"datep" timestamp, -- date 0%
|
||||||
|
"datea" timestamp, -- date 100%
|
||||||
|
"tms" timestamp, -- date modif
|
||||||
"fk_action" integer,
|
"fk_action" integer,
|
||||||
"label" varchar(50) NOT NULL, -- libelle de l'action
|
"label" varchar(50) NOT NULL, -- libelle de l'action
|
||||||
"fk_soc" integer,
|
"fk_soc" integer,
|
||||||
@ -41,6 +44,7 @@ create table llx_actioncomm
|
|||||||
"percent" smallint NOT NULL default 0,
|
"percent" smallint NOT NULL default 0,
|
||||||
"note" text,
|
"note" text,
|
||||||
"propalrowid" integer,
|
"propalrowid" integer,
|
||||||
|
"fk_commande" integer,
|
||||||
"fk_facture" integer
|
"fk_facture" integer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,8 @@ create table llx_bank_account
|
|||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"datec" timestamp,
|
"datec" timestamp,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"label" varchar(30),
|
"ref" varchar(12) NOT NULL,
|
||||||
|
"label" varchar(30) NOT NULL,
|
||||||
"bank" varchar(60),
|
"bank" varchar(60),
|
||||||
"code_banque" varchar(7),
|
"code_banque" varchar(7),
|
||||||
"code_guichet" varchar(6),
|
"code_guichet" varchar(6),
|
||||||
|
|||||||
@ -3,8 +3,9 @@
|
|||||||
-- (c) 2005, Laurent Destailleur.
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
|
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
|
||||||
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||||
|
-- Copyright (C) 2005-2006 Regis Houssin <regis.houssin@cap-networks.com>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -28,6 +29,7 @@
|
|||||||
create table llx_categorie
|
create table llx_categorie
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"label" VARCHAR(255),
|
"label" VARCHAR(255), -- nom de la catégorie
|
||||||
"description" text
|
"description" text, -- description de la catégorie
|
||||||
|
"visible" smallint DEFAULT 1 NOT NULL -- determine si les produits sont visible ou pas
|
||||||
);
|
);
|
||||||
|
|||||||
36
pgsql/tables/llx_comfourn_facfourn.sql
Normal file
36
pgsql/tables/llx_comfourn_facfourn.sql
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2005-2006 Regis Houssin <regis.houssin@cap-networks.com>
|
||||||
|
--
|
||||||
|
-- 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_comfourn_facfourn
|
||||||
|
(
|
||||||
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"fk_commande" integer NOT NULL,
|
||||||
|
"fk_facture" integer NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE INDEX idx_llx_comfourn_facfourn_fk_commande ON llx_comfourn_facfourn (fk_commande);
|
||||||
|
CREATE INDEX idx_llx_comfourn_facfourn_fk_facture ON llx_comfourn_facfourn (fk_facture);
|
||||||
32
pgsql/tables/llx_commande.key.sql
Normal file
32
pgsql/tables/llx_commande.key.sql
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- 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$
|
||||||
|
--
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
-- Supprimme orphelins pour permettre montée de la clé
|
||||||
|
-- V4 DELETE llx_commande FROM llx_commande LEFT JOIN llx_societe ON llx_commande.fk_soc = llx_societe.idp WHERE llx_societe.idp IS NULL;
|
||||||
|
|
||||||
|
ALTER TABLE llx_commande ADD INDEX idx_commande_fk_soc (fk_soc);
|
||||||
|
ALTER TABLE llx_commande ADD CONSTRAINT fk_commande_societe FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp);
|
||||||
@ -24,33 +24,41 @@
|
|||||||
--
|
--
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create table llx_commande
|
create table llx_commande
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"fk_soc" integer,
|
"fk_soc" integer NOT NULL,
|
||||||
"fk_soc_contact" 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, -- order number
|
"ref" varchar(30) NOT NULL, -- order number
|
||||||
"ref_client" varchar(30), -- customer order number
|
"ref_client" varchar(30), -- customer order number
|
||||||
"date_creation" timestamp, -- date de creation
|
"date_creation" timestamp, -- date de creation
|
||||||
"date_valid" timestamp, -- date de validation
|
"date_valid" timestamp, -- date de validation
|
||||||
"date_cloture" timestamp, -- date de cloture
|
"date_cloture" timestamp, -- date de cloture
|
||||||
"date_commande" date, -- date de la commande
|
"date_commande" date, -- date de la commande
|
||||||
"fk_user_author" integer, -- createur de la commande
|
"fk_user_author" integer, -- createur de la commande
|
||||||
"fk_user_valid" integer, -- valideur de la commande
|
"fk_user_valid" integer, -- valideur de la commande
|
||||||
"fk_user_cloture" integer, -- cloture de la propale signee ou non signee
|
"fk_user_cloture" integer, -- auteur cloture
|
||||||
"source" smallint NOT NULL,
|
"source" smallint NOT NULL,
|
||||||
"fk_statut" smallint default 0,
|
"fk_statut" smallint default 0,
|
||||||
"amount_ht" real default 0,
|
"amount_ht" real default 0,
|
||||||
"remise_percent" real default 0,
|
"remise_percent" real default 0,
|
||||||
"remise" real default 0,
|
"remise_absolue" real default 0,
|
||||||
"tva" real default 0,
|
"remise" real default 0,
|
||||||
"total_ht" real default 0,
|
"tva" real default 0,
|
||||||
"total_ttc" real default 0,
|
"total_ht" real default 0,
|
||||||
"note" text,
|
"total_ttc" real default 0,
|
||||||
"model_pdf" varchar(50),
|
"note" text,
|
||||||
"facture" smallint default 0,
|
"note_public" text,
|
||||||
|
"model_pdf" varchar(50),
|
||||||
|
"facture" smallint default 0,
|
||||||
|
"fk_cond_reglement" integer, -- condition de réglement
|
||||||
|
"fk_mode_reglement" integer, -- mode de réglement
|
||||||
|
"date_livraison" date default NULL,
|
||||||
|
"fk_adresse_livraison" integer, -- adresse de livraison
|
||||||
UNIQUE(ref)
|
UNIQUE(ref)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
32
pgsql/tables/llx_commande_fournisseur.key.sql
Normal file
32
pgsql/tables/llx_commande_fournisseur.key.sql
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- 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$
|
||||||
|
--
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
-- Supprimme orphelins pour permettre montée de la clé
|
||||||
|
-- V4 DELETE llx_commande_fournisseur FROM llx_commande_fournisseur LEFT JOIN llx_societe ON llx_commande_fournisseur.fk_soc = llx_societe.idp WHERE llx_societe.idp IS NULL;
|
||||||
|
|
||||||
|
ALTER TABLE llx_commande_fournisseur ADD INDEX idx_commande_fournisseur_fk_soc (fk_soc);
|
||||||
|
ALTER TABLE llx_commande_fournisseur ADD CONSTRAINT fk_commande_fournisseur_societe FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp);
|
||||||
@ -25,22 +25,23 @@
|
|||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create table llx_commande_fournisseur
|
create table llx_commande_fournisseur
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"fk_soc" integer,
|
"fk_soc" integer NOT NULL,
|
||||||
"fk_soc_contact" 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
|
"ref" varchar(30) NOT NULL, -- order number
|
||||||
"date_creation" timestamp, -- date de creation
|
"date_creation" timestamp, -- date de creation
|
||||||
"date_valid" timestamp, -- date de validation
|
"date_valid" timestamp, -- date de validation
|
||||||
"date_cloture" timestamp, -- date de cloture
|
"date_cloture" timestamp, -- date de cloture
|
||||||
"date_commande" date, -- date de la commande
|
"date_commande" date, -- date de la commande
|
||||||
"fk_methode_commande" integer default 0,
|
|
||||||
"fk_user_author" integer, -- createur de la commande
|
"fk_user_author" integer, -- createur de la commande
|
||||||
"fk_user_valid" integer, -- valideur de la commande
|
"fk_user_valid" integer, -- valideur de la commande
|
||||||
"fk_user_cloture" integer, -- cloture de la propale signee ou non signee
|
"fk_user_cloture" integer, -- auteur cloture
|
||||||
"source" smallint NOT NULL,
|
"source" smallint NOT NULL,
|
||||||
"fk_statut" smallint default 0,
|
"fk_statut" smallint default 0,
|
||||||
"amount_ht" real default 0,
|
"amount_ht" real default 0,
|
||||||
@ -50,7 +51,9 @@ create table llx_commande_fournisseur
|
|||||||
"total_ht" real default 0,
|
"total_ht" real default 0,
|
||||||
"total_ttc" real default 0,
|
"total_ttc" real default 0,
|
||||||
"note" text,
|
"note" text,
|
||||||
|
"note_public" text,
|
||||||
"model_pdf" varchar(50),
|
"model_pdf" varchar(50),
|
||||||
|
"fk_methode_commande" integer default 0,
|
||||||
UNIQUE(ref)
|
UNIQUE(ref)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -35,5 +35,6 @@ create table llx_commandedet
|
|||||||
"remise_percent" real DEFAULT 0, -- pourcentage de remise
|
"remise_percent" real DEFAULT 0, -- pourcentage de remise
|
||||||
"remise" real DEFAULT 0, -- montant de la remise
|
"remise" real DEFAULT 0, -- montant de la remise
|
||||||
"subprice" real, -- prix avant remise
|
"subprice" real, -- prix avant remise
|
||||||
"price" real -- prix final
|
"price" real, -- prix final
|
||||||
|
"coef" real -- coefficient de marge
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,38 +1,38 @@
|
|||||||
-- Generated from dolibarr_mysql2pgsql
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
-- (c) 2004, PostgreSQL Inc.
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
-- (c) 2005, Laurent Destailleur.
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
-- the Free Software Foundation; either version 2 of the License, or
|
-- the Free Software Foundation; either version 2 of the License, or
|
||||||
-- (at your option) any later version.
|
-- (at your option) any later version.
|
||||||
--
|
--
|
||||||
-- This program is distributed in the hope that it will be useful,
|
-- This program is distributed in the hope that it will be useful,
|
||||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
-- GNU General Public License for more details.
|
-- GNU General Public License for more details.
|
||||||
--
|
--
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
|
|
||||||
create table llx_cond_reglement
|
create table llx_cond_reglement
|
||||||
(
|
(
|
||||||
rowid integer PRIMARY KEY,
|
rowid integer PRIMARY KEY,
|
||||||
"code" varchar(16),
|
"code" varchar(16),
|
||||||
"sortorder" smallint,
|
"sortorder" smallint,
|
||||||
"active" smallint DEFAULT 1,
|
"active" smallint DEFAULT 1,
|
||||||
"libelle" varchar(255),
|
"libelle" varchar(255),
|
||||||
"libelle_facture" text,
|
"libelle_facture" text,
|
||||||
"fdm" smallint, -- reglement fin de mois
|
"fdm" smallint, -- reglement fin de mois
|
||||||
"nbjour" smallint,
|
"nbjour" smallint,
|
||||||
"decalage" smallint
|
"decalage" smallint
|
||||||
);
|
);
|
||||||
|
|||||||
@ -34,5 +34,5 @@
|
|||||||
ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_soc (fk_soc);
|
ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_soc (fk_soc);
|
||||||
ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_user_author (fk_user_author);
|
ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_user_author (fk_user_author);
|
||||||
|
|
||||||
ALTER TABLE llx_contrat ADD FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp);
|
ALTER TABLE llx_contrat ADD CONSTRAINT fk_contrat_societe FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp);
|
||||||
ALTER TABLE llx_contrat ADD FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
ALTER TABLE llx_contrat ADD CONSTRAINT fk_contrat_societe FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
||||||
@ -42,6 +42,8 @@ create table llx_contrat
|
|||||||
"fk_commercial_suivi" integer NOT NULL, -- obsolete
|
"fk_commercial_suivi" integer NOT NULL, -- obsolete
|
||||||
"fk_user_author" integer NOT NULL default 0,
|
"fk_user_author" integer NOT NULL default 0,
|
||||||
"fk_user_mise_en_service" integer,
|
"fk_user_mise_en_service" integer,
|
||||||
"fk_user_cloture" integer
|
"fk_user_cloture" integer,
|
||||||
|
"note" text,
|
||||||
|
"note_public" text
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
36
pgsql/tables/llx_document_model.sql
Normal file
36
pgsql/tables/llx_document_model.sql
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- 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$
|
||||||
|
--
|
||||||
|
-- Liste des modeles de document disponibles
|
||||||
|
--
|
||||||
|
-- ===================================================================
|
||||||
|
|
||||||
|
create table llx_document_model
|
||||||
|
(
|
||||||
|
nom varchar(50) PRIMARY KEY,
|
||||||
|
"type" varchar(12) NOT NULL,
|
||||||
|
"libelle" varchar(255),
|
||||||
|
"description" text
|
||||||
|
);
|
||||||
@ -35,3 +35,5 @@ ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_soc FOREIGN KEY
|
|||||||
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
||||||
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid);
|
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid);
|
||||||
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);
|
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture ADD UNIQUE INDEX idx_facture_uk_facnumber (facnumber);
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
-- Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -28,7 +29,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create table llx_facture
|
create table llx_facture
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
@ -41,11 +41,12 @@ create table llx_facture
|
|||||||
"date_valid" date, -- date de validation
|
"date_valid" date, -- date de validation
|
||||||
"paye" smallint DEFAULT 0 NOT NULL,
|
"paye" smallint DEFAULT 0 NOT NULL,
|
||||||
"amount" real DEFAULT 0 NOT NULL,
|
"amount" real DEFAULT 0 NOT NULL,
|
||||||
"remise_percent" real DEFAULT 0, -- remise globale en pourcent
|
"remise_percent" real DEFAULT 0, -- remise relative
|
||||||
"remise" real DEFAULT 0,
|
"remise_absolue" real DEFAULT 0, -- remise absolue
|
||||||
"tva" real DEFAULT 0, -- montant tva apres remise globale
|
"remise" real DEFAULT 0, -- remise totale calculee
|
||||||
"total" real DEFAULT 0, -- montant total ht apres remise globale
|
"tva" real DEFAULT 0, -- montant tva apres remise totale
|
||||||
"total_ttc" real DEFAULT 0, -- montant total ttc apres remise globale
|
"total" real DEFAULT 0, -- montant total ht apres remise totale
|
||||||
|
"total_ttc" real DEFAULT 0, -- montant total ttc apres remise totale
|
||||||
"fk_statut" smallint DEFAULT 0 NOT NULL,
|
"fk_statut" smallint DEFAULT 0 NOT NULL,
|
||||||
"fk_user_author" integer, -- createur de la facture
|
"fk_user_author" integer, -- createur de la facture
|
||||||
"fk_user_valid" integer, -- valideur de la facture
|
"fk_user_valid" integer, -- valideur de la facture
|
||||||
@ -54,8 +55,6 @@ create table llx_facture
|
|||||||
"fk_mode_reglement" integer, -- mode de reglement (Virement, Prélèvement)
|
"fk_mode_reglement" integer, -- mode de reglement (Virement, Prélèvement)
|
||||||
"date_lim_reglement" date, -- date limite de reglement
|
"date_lim_reglement" date, -- date limite de reglement
|
||||||
"note" text,
|
"note" text,
|
||||||
"model" varchar(50),
|
"note_public" text,
|
||||||
UNIQUE(facnumber)
|
"model" varchar(50)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX idx_llx_facture_facnumber ON llx_facture (facnumber);
|
|
||||||
|
|||||||
31
pgsql/tables/llx_facture_fourn_det.key.sql
Normal file
31
pgsql/tables/llx_facture_fourn_det.key.sql
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- 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$
|
||||||
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
|
-- Supprimme orphelins pour permettre montée de la clé
|
||||||
|
-- V4 DELETE llx_facture_fourn_det FROM llx_facture_fourn_det LEFT JOIN llx_facture_fourn ON llx_facture_fourn_det.fk_facture_fourn = llx_facture_fourn.rowid WHERE llx_facture_fourn.rowid IS NULL;
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_facture (fk_facture_fourn);
|
||||||
|
ALTER TABLE llx_facture_fourn_det ADD CONSTRAINT fk_facture_fourn_det_fk_facture FOREIGN KEY (fk_facture_fourn) REFERENCES llx_facture_fourn (rowid);
|
||||||
@ -3,7 +3,8 @@
|
|||||||
-- (c) 2005, Laurent Destailleur.
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -25,23 +26,11 @@
|
|||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
create table llx_livre
|
ALTER TABLE llx_facture_rec ADD INDEX idx_facture_rec_fk_soc (fk_soc);
|
||||||
(
|
ALTER TABLE llx_facture_rec ADD INDEX idx_facture_rec_fk_user_author (fk_user_author);
|
||||||
rowid SERIAL PRIMARY KEY,
|
ALTER TABLE llx_facture_rec ADD INDEX idx_facture_rec_fk_projet (fk_projet);
|
||||||
"oscid" integer NOT NULL,
|
|
||||||
"tms" timestamp,
|
|
||||||
"status" smallint,
|
|
||||||
"date_ajout" timestamp,
|
|
||||||
"ref" varchar(12),
|
|
||||||
"title" varchar(64),
|
|
||||||
"annee" int2,
|
|
||||||
"description" text,
|
|
||||||
"prix" decimal(15,4),
|
|
||||||
"fk_editeur" integer,
|
|
||||||
"fk_user_author" integer,
|
|
||||||
"frais_de_port" smallint DEFAULT 1,
|
|
||||||
UNIQUE(ref)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX idx_llx_livre_ref ON llx_livre (ref);
|
ALTER TABLE llx_facture_rec ADD CONSTRAINT fk_facture_rec_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
||||||
|
ALTER TABLE llx_facture_rec ADD CONSTRAINT fk_facture_rec_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture_rec ADD UNIQUE INDEX idx_facture_rec_uk_titre (titre);
|
||||||
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -37,13 +38,17 @@ create table llx_facture_rec
|
|||||||
"amount" real DEFAULT 0 NOT NULL,
|
"amount" real DEFAULT 0 NOT NULL,
|
||||||
"remise" real DEFAULT 0,
|
"remise" real DEFAULT 0,
|
||||||
"remise_percent" real DEFAULT 0,
|
"remise_percent" real DEFAULT 0,
|
||||||
|
"remise_absolue" real DEFAULT 0,
|
||||||
"tva" real DEFAULT 0,
|
"tva" real DEFAULT 0,
|
||||||
"total" real DEFAULT 0,
|
"total" real DEFAULT 0,
|
||||||
"total_ttc" real DEFAULT 0,
|
"total_ttc" real DEFAULT 0,
|
||||||
"fk_user_author" integer, -- createur
|
"fk_user_author" integer, -- createur
|
||||||
"fk_projet" integer, -- projet auquel est associé la facture
|
"fk_projet" integer, -- projet auquel est associé la facture
|
||||||
"fk_cond_reglement" integer, -- condition de reglement
|
"fk_cond_reglement" integer, -- condition de reglement
|
||||||
|
"fk_mode_reglement" integer, -- mode de reglement (Virement, Prélèvement)
|
||||||
|
"date_lim_reglement" date, -- date limite de reglement
|
||||||
"note" text,
|
"note" text,
|
||||||
|
"note_public" text,
|
||||||
"frequency" varchar(2) DEFAULT NULL,
|
"frequency" varchar(2) DEFAULT NULL,
|
||||||
"last_gen" varchar(7) DEFAULT NULL
|
"last_gen" varchar(7) DEFAULT NULL
|
||||||
);
|
);
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
-- (c) 2004, PostgreSQL Inc.
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
-- (c) 2005, Laurent Destailleur.
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -21,13 +21,13 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
-- ===================================================================
|
||||||
-- ============================================================================
|
|
||||||
|
|
||||||
|
|
||||||
create table llx_livre_to_auteur
|
create table llx_facture_stats
|
||||||
(
|
(
|
||||||
"fk_livre" integer NOT NULL,
|
"date_full" timestamp,
|
||||||
"fk_auteur" integer NOT NULL,
|
"date_day" date,
|
||||||
UNIQUE(fk_livre, fk_auteur)
|
"data" varchar(50),
|
||||||
|
"value" real
|
||||||
);
|
);
|
||||||
@ -38,6 +38,7 @@ create table llx_facturedet
|
|||||||
"price" real, -- prix final
|
"price" real, -- prix final
|
||||||
"date_start" timestamp, -- date debut si service
|
"date_start" timestamp, -- date debut si service
|
||||||
"date_end" timestamp, -- date fin si service
|
"date_end" timestamp, -- date fin si service
|
||||||
|
"info_bits" integer DEFAULT 0,
|
||||||
"fk_code_ventilation" integer DEFAULT 0 NOT NULL,
|
"fk_code_ventilation" integer DEFAULT 0 NOT NULL,
|
||||||
"fk_export_compta" integer DEFAULT 0 NOT NULL,
|
"fk_export_compta" integer DEFAULT 0 NOT NULL,
|
||||||
"rang" integer DEFAULT 0
|
"rang" integer DEFAULT 0
|
||||||
|
|||||||
32
pgsql/tables/llx_livraison.key.sql
Normal file
32
pgsql/tables/llx_livraison.key.sql
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- 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: llx_livraison.key.sql,v 1.1 2006/05/05 15:28:06 hregis Exp $
|
||||||
|
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_livraison.key.sql,v $
|
||||||
|
--
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
-- Supprimme orphelins pour permettre montée de la clé
|
||||||
|
-- V4 DELETE llx_livraison FROM llx_livraison LEFT JOIN llx_societe ON llx_livraison.fk_soc = llx_societe.idp WHERE llx_societe.idp IS NULL;
|
||||||
|
|
||||||
|
ALTER TABLE llx_livraison ADD INDEX idx_livraison_fk_soc (fk_soc);
|
||||||
|
ALTER TABLE llx_livraison ADD CONSTRAINT fk_livraison_societe FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp);
|
||||||
52
pgsql/tables/llx_livraison.sql
Normal file
52
pgsql/tables/llx_livraison.sql
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
--
|
||||||
|
-- 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_livraison
|
||||||
|
(
|
||||||
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"tms" timestamp,
|
||||||
|
"fk_soc" integer NOT NULL,
|
||||||
|
"fk_soc_contact" integer,
|
||||||
|
"fk_commande" integer DEFAULT 0, -- commande auquel est rattache le bon de livraison
|
||||||
|
"fk_expedition" integer, -- expedition auquel est rattache le bon de livraison
|
||||||
|
"ref" varchar(30) NOT NULL, -- delivery number
|
||||||
|
"date_creation" timestamp, -- date de creation
|
||||||
|
"date_valid" timestamp, -- date de validation
|
||||||
|
"fk_user_author" integer, -- createur du bon de livraison
|
||||||
|
"fk_user_valid" integer, -- valideur du bon de livraison
|
||||||
|
"fk_statut" smallint default 0,
|
||||||
|
"total_ht" real default 0,
|
||||||
|
"total_ttc" real default 0,
|
||||||
|
"note" text,
|
||||||
|
"note_public" text,
|
||||||
|
"model_pdf" varchar(50),
|
||||||
|
"date_livraison" date default NULL,
|
||||||
|
"fk_adresse_livraison" integer, -- adresse de livraison
|
||||||
|
UNIQUE(ref)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE INDEX idx_llx_livraison_ref ON llx_livraison (ref);
|
||||||
@ -2,9 +2,8 @@
|
|||||||
-- (c) 2004, PostgreSQL Inc.
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
-- (c) 2005, Laurent Destailleur.
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -22,11 +21,15 @@
|
|||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
-- ===================================================================
|
||||||
-- ===========================================================================
|
|
||||||
|
|
||||||
|
create table llx_livraisondet
|
||||||
|
(
|
||||||
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"fk_livraison" integer,
|
||||||
|
"fk_commande_ligne" integer NOT NULL,
|
||||||
|
"qty" real -- quantité
|
||||||
|
);
|
||||||
|
|
||||||
ALTER TABLE llx_accountingsystem_det ADD INDEX idx_accountingsystem_det_fk_pcg_version (fk_pcg_version);
|
CREATE INDEX idx_llx_livraisondet_fk_livraison ON llx_livraisondet (fk_livraison);
|
||||||
|
CREATE INDEX idx_llx_livraisondet_fk_commande_ligne ON llx_livraisondet (fk_commande_ligne);
|
||||||
|
|
||||||
ALTER TABLE llx_accountingsystem_det ADD CONSTRAINT fk_accountingsystem_det_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accountingsystem (pcg_version);
|
|
||||||
@ -36,5 +36,6 @@ create table llx_paiementfourn
|
|||||||
"fk_paiement" integer NOT NULL, -- moyen de paiement
|
"fk_paiement" integer NOT NULL, -- moyen de paiement
|
||||||
"num_paiement" varchar(50), -- numéro de paiement (cheque)
|
"num_paiement" varchar(50), -- numéro de paiement (cheque)
|
||||||
"note" text,
|
"note" text,
|
||||||
"fk_bank" integer NOT NULL
|
"fk_bank" integer NOT NULL,
|
||||||
|
"statut" int2 NOT NULL DEFAULT 0
|
||||||
);
|
);
|
||||||
|
|||||||
29
pgsql/tables/llx_paiementfourn_facturefourn.key.sql
Normal file
29
pgsql/tables/llx_paiementfourn_facturefourn.key.sql
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2005 Marc Barilley / Océbo <marc@ocebo.com>
|
||||||
|
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- 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$
|
||||||
|
-- ===========================================================================
|
||||||
|
|
||||||
|
ALTER TABLE llx_paiementfourn_facturefourn ADD INDEX idx_paiementfourn_facturefourn_fk_facture(fk_facturefourn);
|
||||||
|
ALTER TABLE llx_paiementfourn_facturefourn ADD INDEX idx_paiementfourn_facturefourn_fk_paiement(fk_paiementfourn);
|
||||||
@ -1,36 +1,34 @@
|
|||||||
-- Generated from dolibarr_mysql2pgsql
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
-- (c) 2004, PostgreSQL Inc.
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
-- (c) 2005, Laurent Destailleur.
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2005 Marc Barilley / Océbo <marc@ocebo.com>
|
-- Copyright (C) 2005 Marc Barilley / Océbo <marc@ocebo.com>
|
||||||
--
|
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- 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
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
-- the Free Software Foundation; either version 2 of the License, or
|
-- it under the terms of the GNU General Public License as published by
|
||||||
-- (at your option) any later version.
|
-- 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
|
-- This program is distributed in the hope that it will be useful,
|
||||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
-- GNU General Public License for more details.
|
-- 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
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- 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$
|
-- $Id$
|
||||||
--
|
-- $Source$
|
||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
|
|
||||||
create table llx_paiementfourn_facturefourn
|
create table llx_paiementfourn_facturefourn
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_paiementfourn" int4 default NULL,
|
"fk_paiementfourn" INT(11) DEFAULT NULL,
|
||||||
"fk_facturefourn" int4 default NULL,
|
"fk_facturefourn" INT(11) DEFAULT NULL,
|
||||||
"amount" real default '0',
|
"amount" real DEFAULT '0'
|
||||||
UNIQUE(fk_facturefourn),
|
);
|
||||||
UNIQUE(fk_paiementfourn)
|
|
||||||
);
|
|
||||||
@ -43,7 +43,8 @@ create table llx_product
|
|||||||
"duration" varchar(6),
|
"duration" varchar(6),
|
||||||
"stock_propale" integer DEFAULT 0,
|
"stock_propale" integer DEFAULT 0,
|
||||||
"stock_commande" integer DEFAULT 0,
|
"stock_commande" integer DEFAULT 0,
|
||||||
"seuil_stock_alerte" integer DEFAULT 0
|
"seuil_stock_alerte" integer DEFAULT 0,
|
||||||
|
"gencode" varchar(255) DEFAULT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
-- (c) 2005, Laurent Destailleur.
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -24,13 +24,12 @@
|
|||||||
--
|
--
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
|
|
||||||
create table llx_lieu_concert
|
create table llx_product_det
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"tms" timestamp,
|
"fk_product" integer DEFAULT 0 NOT NULL,
|
||||||
"nom" varchar(64) NOT NULL,
|
"lang" varchar(5) DEFAULT 0 NOT NULL,
|
||||||
"description" text,
|
"label" varchar(128),
|
||||||
"ville" varchar(64) NOT NULL,
|
"description" varchar(255),
|
||||||
"fk_user_author" integer
|
"note" text
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1,38 +1,38 @@
|
|||||||
-- Generated from dolibarr_mysql2pgsql
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
-- (c) 2004, PostgreSQL Inc.
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
-- (c) 2005, Laurent Destailleur.
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
-- the Free Software Foundation; either version 2 of the License, or
|
-- the Free Software Foundation; either version 2 of the License, or
|
||||||
-- (at your option) any later version.
|
-- (at your option) any later version.
|
||||||
--
|
--
|
||||||
-- This program is distributed in the hope that it will be useful,
|
-- This program is distributed in the hope that it will be useful,
|
||||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
-- GNU General Public License for more details.
|
-- GNU General Public License for more details.
|
||||||
--
|
--
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create table llx_projet_task_actors
|
create table llx_projet_task_actors
|
||||||
(
|
(
|
||||||
"fk_projet_task" integer NOT NULL,
|
"fk_projet_task" integer NOT NULL,
|
||||||
"fk_user" integer NOT NULL,
|
"fk_user" integer NOT NULL,
|
||||||
"role" varchar(5) CHECK (role IN ('admin','read','acto','info')) DEFAULT 'admin',
|
"role" varchar(5) CHECK (role IN ('admin','read','acto','info')) DEFAULT 'admin',
|
||||||
UNIQUE(fk_projet_task, fk_user)
|
UNIQUE(fk_projet_task, fk_user)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX idx_llx_projet_task_actors_fk_projet_task_fk_user ON llx_projet_task_actors (fk_projet_task, fk_user);
|
CREATE INDEX idx_llx_projet_task_actors_fk_projet_task_fk_user ON llx_projet_task_actors (fk_projet_task, fk_user);
|
||||||
CREATE INDEX idx_llx_projet_task_actors_role ON llx_projet_task_actors (role)
|
CREATE INDEX idx_llx_projet_task_actors_role ON llx_projet_task_actors (role);
|
||||||
|
|||||||
@ -1,40 +1,40 @@
|
|||||||
-- Generated from dolibarr_mysql2pgsql
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
-- (c) 2004, PostgreSQL Inc.
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
-- (c) 2005, Laurent Destailleur.
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
-- the Free Software Foundation; either version 2 of the License, or
|
-- the Free Software Foundation; either version 2 of the License, or
|
||||||
-- (at your option) any later version.
|
-- (at your option) any later version.
|
||||||
--
|
--
|
||||||
-- This program is distributed in the hope that it will be useful,
|
-- This program is distributed in the hope that it will be useful,
|
||||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
-- GNU General Public License for more details.
|
-- GNU General Public License for more details.
|
||||||
--
|
--
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create table llx_projet_task_time
|
create table llx_projet_task_time
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
"fk_task" integer NOT NULL,
|
"fk_task" integer NOT NULL,
|
||||||
"task_date" date,
|
"task_date" date,
|
||||||
"task_duration" real,
|
"task_duration" real,
|
||||||
"fk_user" integer,
|
"fk_user" integer,
|
||||||
"note" text
|
"note" text
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX idx_llx_projet_task_time_fk_task ON llx_projet_task_time (fk_task);
|
CREATE INDEX idx_llx_projet_task_time_fk_task ON llx_projet_task_time (fk_task);
|
||||||
CREATE INDEX idx_llx_projet_task_time_fk_user ON llx_projet_task_time (fk_user);
|
CREATE INDEX idx_llx_projet_task_time_fk_user ON llx_projet_task_time (fk_user);
|
||||||
|
|||||||
@ -25,8 +25,6 @@
|
|||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create table llx_propal
|
create table llx_propal
|
||||||
(
|
(
|
||||||
rowid SERIAL PRIMARY KEY,
|
rowid SERIAL PRIMARY KEY,
|
||||||
@ -44,15 +42,21 @@ create table llx_propal
|
|||||||
"fk_user_cloture" integer, -- cloture de la propale signee ou non signee
|
"fk_user_cloture" integer, -- cloture de la propale signee ou non signee
|
||||||
"fk_statut" smallint DEFAULT 0 NOT NULL,
|
"fk_statut" smallint DEFAULT 0 NOT NULL,
|
||||||
"price" real DEFAULT 0,
|
"price" real DEFAULT 0,
|
||||||
"remise_percent" real DEFAULT 0, -- remise globale en pourcent
|
"remise_percent" real DEFAULT 0, -- remise globale relative en pourcent
|
||||||
"remise" real DEFAULT 0,
|
"remise_absolue" real DEFAULT 0, -- remise globale absolue
|
||||||
|
"remise" real DEFAULT 0, -- remise calculee
|
||||||
"tva" real DEFAULT 0, -- montant tva apres remise globale
|
"tva" real DEFAULT 0, -- montant tva apres remise globale
|
||||||
"total_ht" real DEFAULT 0, -- montant total ht apres remise globale
|
"total_ht" real DEFAULT 0, -- montant total ht apres remise globale
|
||||||
"total" real DEFAULT 0, -- montant total ttc apres remise globale
|
"total" real DEFAULT 0, -- montant total ttc apres remise globale
|
||||||
"fk_cond_reglement" integer, -- condition de reglement (30 jours, fin de mois ...)
|
"fk_cond_reglement" integer, -- condition de reglement (30 jours, fin de mois ...)
|
||||||
"fk_mode_reglement" integer, -- mode de reglement (Virement, Prélèvement)
|
"fk_mode_reglement" integer, -- mode de reglement (Virement, Prélèvement)
|
||||||
|
|
||||||
"note" text,
|
"note" text,
|
||||||
|
"note_public" text,
|
||||||
"model_pdf" varchar(50),
|
"model_pdf" varchar(50),
|
||||||
|
"date_livraison" date default NULL,
|
||||||
|
"fk_adresse_livraison" integer, -- adresse de livraison
|
||||||
|
|
||||||
UNIQUE(ref)
|
UNIQUE(ref)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -1,72 +1,72 @@
|
|||||||
-- Generated from dolibarr_mysql2pgsql
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
-- (c) 2004, PostgreSQL Inc.
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
-- (c) 2005, Laurent Destailleur.
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
-- the Free Software Foundation; either version 2 of the License, or
|
-- the Free Software Foundation; either version 2 of the License, or
|
||||||
-- (at your option) any later version.
|
-- (at your option) any later version.
|
||||||
--
|
--
|
||||||
-- This program is distributed in the hope that it will be useful,
|
-- This program is distributed in the hope that it will be useful,
|
||||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
-- GNU General Public License for more details.
|
-- GNU General Public License for more details.
|
||||||
--
|
--
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
--
|
--
|
||||||
-- $Id$
|
-- $Id$
|
||||||
-- $Source$
|
-- $Source$
|
||||||
--
|
--
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
|
|
||||||
create table llx_societe
|
create table llx_societe
|
||||||
(
|
(
|
||||||
idp SERIAL PRIMARY KEY,
|
idp SERIAL PRIMARY KEY,
|
||||||
"id" varchar(32), -- private id
|
"id" varchar(32), -- private id
|
||||||
"active" smallint DEFAULT 0, --
|
"active" smallint DEFAULT 0, --
|
||||||
"parent" integer DEFAULT 0, --
|
"parent" integer DEFAULT 0, --
|
||||||
"tms" timestamp,
|
"tms" timestamp,
|
||||||
"datec" timestamp, -- creation date
|
"datec" timestamp, -- creation date
|
||||||
"datea" timestamp, -- activation date
|
"datea" timestamp, -- activation date
|
||||||
"nom" varchar(60), -- company name
|
"nom" varchar(60), -- company name
|
||||||
"code_client" varchar(15), -- code client
|
"code_client" varchar(15), -- code client
|
||||||
"code_fournisseur" varchar(15), -- code founisseur
|
"code_fournisseur" varchar(15), -- code founisseur
|
||||||
"code_compta" varchar(15), -- code compta client
|
"code_compta" varchar(15), -- code compta client
|
||||||
"code_compta_fournisseur" varchar(15), -- code compta founisseur
|
"code_compta_fournisseur" varchar(15), -- code compta founisseur
|
||||||
"address" varchar(255), -- company adresse
|
"address" varchar(255), -- company adresse
|
||||||
"cp" varchar(10), -- zipcode
|
"cp" varchar(10), -- zipcode
|
||||||
"ville" varchar(50), -- town
|
"ville" varchar(50), -- town
|
||||||
"fk_departement" integer DEFAULT 0, --
|
"fk_departement" integer DEFAULT 0, --
|
||||||
"fk_pays" integer DEFAULT 0, --
|
"fk_pays" integer DEFAULT 0, --
|
||||||
"tel" varchar(20), -- phone number
|
"tel" varchar(20), -- phone number
|
||||||
"fax" varchar(20), -- fax number
|
"fax" varchar(20), -- fax number
|
||||||
"url" varchar(255), --
|
"url" varchar(255), --
|
||||||
"fk_secteur" integer DEFAULT 0, --
|
"fk_secteur" integer DEFAULT 0, --
|
||||||
"fk_effectif" integer DEFAULT 0, --
|
"fk_effectif" integer DEFAULT 0, --
|
||||||
"fk_typent" integer DEFAULT 0, --
|
"fk_typent" integer DEFAULT 0, --
|
||||||
"fk_forme_juridique" integer DEFAULT 0, -- forme juridique INSEE
|
"fk_forme_juridique" integer DEFAULT 0, -- forme juridique INSEE
|
||||||
"siren" varchar(9), -- siren ou RCS
|
"siren" varchar(9), -- siren ou RCS
|
||||||
"siret" varchar(14), -- numero de siret
|
"siret" varchar(14), -- numero de siret
|
||||||
"ape" varchar(4), -- code ape
|
"ape" varchar(4), -- code ape
|
||||||
"tva_intra" varchar(20), -- tva intracommunautaire
|
"tva_intra" varchar(20), -- tva intracommunautaire
|
||||||
"capital" real, -- capital de la société
|
"capital" real, -- capital de la société
|
||||||
"description" text, --
|
"description" text, --
|
||||||
"fk_stcomm" smallint DEFAULT 0, -- commercial statut
|
"fk_stcomm" smallint DEFAULT 0, -- commercial statut
|
||||||
"note" text, --
|
"note" text, --
|
||||||
"services" integer DEFAULT 0, --
|
"services" integer DEFAULT 0, --
|
||||||
"prefix_comm" varchar(5), -- prefix commercial
|
"prefix_comm" varchar(5), -- prefix commercial
|
||||||
"client" integer DEFAULT 0, -- client oui/non
|
"client" integer 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
|
"rubrique" varchar(255), -- champ rubrique libre
|
||||||
"fk_user_creat" integer, -- utilisateur qui a créé l'info
|
"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
|
||||||
"remise_client" real DEFAULT 0, -- remise systématique pour le client
|
"remise_client" real DEFAULT 0, -- remise systématique pour le client
|
||||||
"mode_reglement" integer DEFAULT 0 , -- mode de réglement
|
"mode_reglement" integer DEFAULT 0, -- mode de réglement
|
||||||
"cond_reglement" integer DEFAULT 1 NOT NULL -- condition de réglement
|
"cond_reglement" integer DEFAULT 1 NOT NULL, -- condition de réglement
|
||||||
);
|
"tva_assuj" smallint DEFAULT 1 -- assujéti ou non à la TVA
|
||||||
|
);
|
||||||
|
|||||||
44
pgsql/tables/llx_societe_adresse_livraison.sql
Normal file
44
pgsql/tables/llx_societe_adresse_livraison.sql
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
-- Generated from dolibarr_mysql2pgsql
|
||||||
|
-- (c) 2004, PostgreSQL Inc.
|
||||||
|
-- (c) 2005, Laurent Destailleur.
|
||||||
|
|
||||||
|
-- ========================================================================
|
||||||
|
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2005-2006 Houssin Régis <regis.houssin@cap-networks.com>
|
||||||
|
--
|
||||||
|
-- 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_societe_adresse_livraison
|
||||||
|
(
|
||||||
|
rowid SERIAL PRIMARY KEY,
|
||||||
|
"datec" timestamp, -- creation date
|
||||||
|
"tms" timestamp, -- modification date
|
||||||
|
"label" varchar(30), --
|
||||||
|
"fk_societe" integer DEFAULT 0, --
|
||||||
|
"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, --
|
||||||
|
"note" text, --
|
||||||
|
"fk_user_creat" integer, -- utilisateur qui a créé l'info
|
||||||
|
"fk_user_modif" integer -- utilisateur qui a modifié l'info
|
||||||
|
);
|
||||||
Loading…
Reference in New Issue
Block a user