From 44869cc29df95b33d93af150b526298fe5e80cec Mon Sep 17 00:00:00 2001 From: opensides Date: Sat, 5 Jun 2004 23:57:23 +0000 Subject: [PATCH] nouvelle version pour dolibarr 1.1.0 --- pgsql/tables/llx_product_fournisseur.sql | 37 ++++++++++++++++ pgsql/tables/llx_product_price.sql | 35 +++++++++++++++ pgsql/tables/llx_product_stock.sql | 36 ++++++++++++++++ pgsql/tables/llx_propal_model_pdf.sql | 31 +++++++++++++ pgsql/tables/llx_rights_def.sql | 32 ++++++++++++++ pgsql/tables/llx_soc_events.sql | 33 ++++++++++++++ pgsql/tables/llx_societe.sql | 55 ++++++++++++++++++++++++ pgsql/tables/llx_socpeople.sql | 41 ++++++++++++++++++ pgsql/tables/llx_socstatutlog.sql | 31 +++++++++++++ pgsql/tables/llx_sqltables.sql | 30 +++++++++++++ pgsql/tables/llx_stock_mouvement.sql | 38 ++++++++++++++++ pgsql/tables/llx_transaction_bplc.sql | 35 +++++++++++++++ pgsql/tables/llx_user_rights.sql | 30 +++++++++++++ 13 files changed, 464 insertions(+) create mode 100644 pgsql/tables/llx_product_fournisseur.sql create mode 100644 pgsql/tables/llx_product_price.sql create mode 100644 pgsql/tables/llx_product_stock.sql create mode 100644 pgsql/tables/llx_propal_model_pdf.sql create mode 100644 pgsql/tables/llx_rights_def.sql create mode 100644 pgsql/tables/llx_soc_events.sql create mode 100644 pgsql/tables/llx_societe.sql create mode 100644 pgsql/tables/llx_socpeople.sql create mode 100644 pgsql/tables/llx_socstatutlog.sql create mode 100644 pgsql/tables/llx_sqltables.sql create mode 100644 pgsql/tables/llx_stock_mouvement.sql create mode 100644 pgsql/tables/llx_transaction_bplc.sql create mode 100644 pgsql/tables/llx_user_rights.sql diff --git a/pgsql/tables/llx_product_fournisseur.sql b/pgsql/tables/llx_product_fournisseur.sql new file mode 100644 index 00000000000..a749157fae7 --- /dev/null +++ b/pgsql/tables/llx_product_fournisseur.sql @@ -0,0 +1,37 @@ +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- 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_product_fournisseur +( + rowid SERIAL PRIMARY KEY, + datec timestamp, + tms timestamp, + fk_product integer, + fk_soc integer, + ref_fourn varchar(30), + fk_user_author integer +); + +CREATE INDEX llx_product_fournisseur_fk_product ON llx_product_fournisseur (fk_product); + +CREATE INDEX llx_product_fournisseur_fk_soc ON llx_product_fournisseur (fk_soc); diff --git a/pgsql/tables/llx_product_price.sql b/pgsql/tables/llx_product_price.sql new file mode 100644 index 00000000000..178160d94a6 --- /dev/null +++ b/pgsql/tables/llx_product_price.sql @@ -0,0 +1,35 @@ +-- ============================================================================ +-- Copyright (C) 2002-2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- 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_product_price +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + fk_product integer NOT NULL, + date_price timestamp NOT NULL, + price double precision, + tva_tx double precision default 19.6, + fk_user_author integer, + envente smallint default 1 +); + diff --git a/pgsql/tables/llx_product_stock.sql b/pgsql/tables/llx_product_stock.sql new file mode 100644 index 00000000000..bb7a6a7b847 --- /dev/null +++ b/pgsql/tables/llx_product_stock.sql @@ -0,0 +1,36 @@ +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- 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_product_stock +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + fk_product integer NOT NULL, + fk_stock integer NOT NULL, + value integer +); + +CREATE INDEX llx_product_stock_fk_product ON llx_product_stock (fk_product); + +CREATE INDEX llx_product_stock_fk_stock ON llx_product_stock (fk_stock); + diff --git a/pgsql/tables/llx_propal_model_pdf.sql b/pgsql/tables/llx_propal_model_pdf.sql new file mode 100644 index 00000000000..68cabbb34a8 --- /dev/null +++ b/pgsql/tables/llx_propal_model_pdf.sql @@ -0,0 +1,31 @@ +-- =================================================================== +-- Copyright (C) 2001-2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- 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 propale pdf disponibles +-- +-- =================================================================== + +create table llx_propal_model_pdf +( + nom varchar(50) PRIMARY KEY, + libelle varchar(255), + description text +); diff --git a/pgsql/tables/llx_rights_def.sql b/pgsql/tables/llx_rights_def.sql new file mode 100644 index 00000000000..234b5b30add --- /dev/null +++ b/pgsql/tables/llx_rights_def.sql @@ -0,0 +1,32 @@ +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- 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_rights_def +( + id integer PRIMARY KEY, + libelle varchar(255), + module varchar(12), + type CHAR CHECK (type IN ('r','w','m','d','a')), + bydefault smallint default 0 +); + diff --git a/pgsql/tables/llx_soc_events.sql b/pgsql/tables/llx_soc_events.sql new file mode 100644 index 00000000000..cc28d3ba776 --- /dev/null +++ b/pgsql/tables/llx_soc_events.sql @@ -0,0 +1,33 @@ +-- ======================================================================== +-- Copyright (C) 2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 ?ric Seigne +-- +-- $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. +-- +-- ======================================================================== + +create table llx_soc_events +( + rowid SERIAL PRIMARY KEY, + fk_soc int NOT NULL, -- + dateb timestamp NOT NULL, -- begin date + datee timestamp NOT NULL, -- end date + title varchar(100) NOT NULL, + url varchar(255), + description text +); diff --git a/pgsql/tables/llx_societe.sql b/pgsql/tables/llx_societe.sql new file mode 100644 index 00000000000..16a87a93913 --- /dev/null +++ b/pgsql/tables/llx_societe.sql @@ -0,0 +1,55 @@ +-- ======================================================================== +-- Copyright (C) 2000-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 ?ric Seigne +-- Copyright (C) 2004 Benoit Mortier +-- +-- $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. +-- +-- ======================================================================== + +create table llx_societe +( + idp SERIAL PRIMARY KEY, + id varchar(32), -- private id + active smallint default 0, -- + parent integer default 0, -- + tms timestamp, + datec timestamp, -- creation date + datea timestamp, -- activation date + nom varchar(60), -- company name + address varchar(255), -- company adresse + cp varchar(10), -- zipcode + ville varchar(50), -- town + fk_pays integer default 0, -- + tel varchar(20), -- phone number + fax varchar(20), -- fax number + url varchar(255), -- + fk_secteur integer default 0, -- + fk_effectif integer default 0, -- + fk_typent integer default 0, -- + siren varchar(9), -- + description text, -- + fk_stcomm smallint default 0, -- commercial statut + note text, -- + services integer default 0, -- + prefix_comm varchar(5), -- prefix commercial + client smallint default 0, -- client oui/non + fournisseur smallint default 0 -- fournisseur oui/non +); + +create unique index llx_societe_prefix_comm on llx_societe(prefix_comm); diff --git a/pgsql/tables/llx_socpeople.sql b/pgsql/tables/llx_socpeople.sql new file mode 100644 index 00000000000..69b7c2bb66c --- /dev/null +++ b/pgsql/tables/llx_socpeople.sql @@ -0,0 +1,41 @@ +-- ============================================================================ +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 ?ric Seigne +-- Copyright (C) 2004 Benoit Mortier +-- +-- $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. +-- +-- ============================================================================ + +create table llx_socpeople +( + idp SERIAL PRIMARY KEY, + datec timestamp, + fk_soc integer, + name varchar(50), + firstname varchar(50), + address varchar(255), + poste varchar(80), + phone varchar(30), + fax varchar(30), + email varchar(255), + fk_user integer default 0, + note text +); + +CREATE INDEX llx_socpeople_fk_soc ON llx_socpeople(fk_soc); diff --git a/pgsql/tables/llx_socstatutlog.sql b/pgsql/tables/llx_socstatutlog.sql new file mode 100644 index 00000000000..49e965f0c3c --- /dev/null +++ b/pgsql/tables/llx_socstatutlog.sql @@ -0,0 +1,31 @@ +-- ======================================================================== +-- Copyright (C) 2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 ?ric Seigne +-- +-- $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. +-- +-- ======================================================================== + +create table llx_socstatutlog +( + id SERIAL PRIMARY KEY, + datel timestamp, + fk_soc integer, + fk_statut integer, + author varchar(30) +); diff --git a/pgsql/tables/llx_sqltables.sql b/pgsql/tables/llx_sqltables.sql new file mode 100644 index 00000000000..4399de747c5 --- /dev/null +++ b/pgsql/tables/llx_sqltables.sql @@ -0,0 +1,30 @@ +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- 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_sqltables +( + rowid SERIAL PRIMARY KEY, + name varchar(255), + loaded smallint +); + diff --git a/pgsql/tables/llx_stock_mouvement.sql b/pgsql/tables/llx_stock_mouvement.sql new file mode 100644 index 00000000000..ef1d327b9ff --- /dev/null +++ b/pgsql/tables/llx_stock_mouvement.sql @@ -0,0 +1,38 @@ +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- 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_stock_mouvement +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + datem timestamp, + fk_product integer NOT NULL, + fk_stock integer NOT NULL, + value integer, + type_mouvement smallint, + fk_user_author integer +); + + CREATE INDEX llx_stock_mouvement_fk_product ON llx_stock_mouvement (fk_product); + + CREATE INDEX llx_stock_mouvement_fk_stock ON llx_stock_mouvement (fk_stock); diff --git a/pgsql/tables/llx_transaction_bplc.sql b/pgsql/tables/llx_transaction_bplc.sql new file mode 100644 index 00000000000..dfd6c341a49 --- /dev/null +++ b/pgsql/tables/llx_transaction_bplc.sql @@ -0,0 +1,35 @@ +-- =================================================================== +-- Copyright 2004 Benoit Mortier + +-- 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_transaction_bplc +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + ipclient varchar(20), + num_transaction varchar(10), + date_transaction varchar(10), + heure_transaction varchar(10), + num_autorisation varchar(10), + cle_acceptation varchar(5), + code_retour varchar(4), + ref_commande integer +); diff --git a/pgsql/tables/llx_user_rights.sql b/pgsql/tables/llx_user_rights.sql new file mode 100644 index 00000000000..df21a1ac96f --- /dev/null +++ b/pgsql/tables/llx_user_rights.sql @@ -0,0 +1,30 @@ +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- 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_user_rights +( + fk_user integer NOT NULL, + fk_id integer NOT NULL, + + UNIQUE(fk_user,fk_id) +);