From f4dec434cbef92738702b2626060ac86df7438b4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Jul 2008 23:09:07 +0000 Subject: [PATCH] Maj scripts --- pgsql/tables/llx_entrepot_valorisation.sql | 6 ++-- pgsql/tables/llx_product_fournisseur.key.sql | 29 ++++++++++++++++++++ pgsql/tables/llx_product_fournisseur.sql | 6 +--- pgsql/tables/llx_product_stock.key.sql | 29 ++++++++++++++++++++ pgsql/tables/llx_product_stock.sql | 6 +--- pgsql/tables/llx_projet_task.sql | 8 +----- pgsql/tables/llx_projet_task_actors.sql | 4 +-- pgsql/tables/llx_projet_task_time.sql | 7 +---- pgsql/tables/llx_stock_mouvement.key.sql | 29 ++++++++++++++++++++ pgsql/tables/llx_stock_mouvement.sql | 6 +--- pgsql/tables/llx_stock_valorisation.key.sql | 28 +++++++++++++++++++ pgsql/tables/llx_stock_valorisation.sql | 5 +--- 12 files changed, 124 insertions(+), 39 deletions(-) create mode 100644 pgsql/tables/llx_product_fournisseur.key.sql create mode 100644 pgsql/tables/llx_product_stock.key.sql create mode 100644 pgsql/tables/llx_stock_mouvement.key.sql create mode 100644 pgsql/tables/llx_stock_valorisation.key.sql diff --git a/pgsql/tables/llx_entrepot_valorisation.sql b/pgsql/tables/llx_entrepot_valorisation.sql index eb84ef7ffea..b86228ce1e1 100644 --- a/pgsql/tables/llx_entrepot_valorisation.sql +++ b/pgsql/tables/llx_entrepot_valorisation.sql @@ -19,7 +19,7 @@ -- 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_entrepot_valorisation.sql,v 1.3 2007/12/02 21:58:49 eldy Exp +-- Id: llx_entrepot_valorisation.sql,v 1.4 2008/07/02 22:37:52 eldy Exp -- ============================================================================ create table llx_entrepot_valorisation @@ -27,9 +27,7 @@ create table llx_entrepot_valorisation rowid SERIAL PRIMARY KEY, "tms" timestamp, -- date technique mise à jour automatiquement "date_calcul" date, -- date auquel a ete calcule la valeur - "fk_entrepot" integer NOT NULL , + "fk_entrepot" integer NOT NULL, "valo_pmp" float(12,4) -- valoristaion du stock en PMP ); -CREATE INDEX idx_llx_entrepot_valorisation_fk_entrepot ON llx_entrepot_valorisation (fk_entrepot); - diff --git a/pgsql/tables/llx_product_fournisseur.key.sql b/pgsql/tables/llx_product_fournisseur.key.sql new file mode 100644 index 00000000000..4ecbbb67409 --- /dev/null +++ b/pgsql/tables/llx_product_fournisseur.key.sql @@ -0,0 +1,29 @@ +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2002-2004 Rodolphe Quiedeville +-- Copyright (C) 2004-2005 Laurent Destailleur +-- +-- 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_product_fournisseur.key.sql,v 1.1 2008/07/02 22:37:52 eldy Exp +-- ============================================================================ + + +ALTER TABLE llx_product_fournisseur ADD INDEX idx_product_fourn_fk_product (fk_product); + +ALTER TABLE llx_product_fournisseur ADD INDEX idx_product_fourn_fk_soc (fk_soc); diff --git a/pgsql/tables/llx_product_fournisseur.sql b/pgsql/tables/llx_product_fournisseur.sql index 8a3865260eb..61a0ce1b62f 100644 --- a/pgsql/tables/llx_product_fournisseur.sql +++ b/pgsql/tables/llx_product_fournisseur.sql @@ -19,10 +19,9 @@ -- 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_product_fournisseur.sql,v 1.5 2007/12/02 21:37:45 eldy Exp +-- Id: llx_product_fournisseur.sql,v 1.6 2008/07/02 22:37:52 eldy Exp -- ============================================================================ - create table llx_product_fournisseur ( rowid SERIAL PRIMARY KEY, @@ -34,6 +33,3 @@ create table llx_product_fournisseur "fk_user_author" integer ); -CREATE INDEX idx_llx_product_fournisseur_fk_product ON llx_product_fournisseur (fk_product); -CREATE INDEX idx_llx_product_fournisseur_fk_soc ON llx_product_fournisseur (fk_soc); - diff --git a/pgsql/tables/llx_product_stock.key.sql b/pgsql/tables/llx_product_stock.key.sql new file mode 100644 index 00000000000..0a8b97d58f5 --- /dev/null +++ b/pgsql/tables/llx_product_stock.key.sql @@ -0,0 +1,29 @@ +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2002-2004 Rodolphe Quiedeville +-- Copyright (C) 2004-2005 Laurent Destailleur +-- +-- 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_product_stock.key.sql,v 1.1 2008/07/02 22:37:52 eldy Exp +-- ============================================================================ + + +ALTER TABLE llx_product_stock ADD INDEX idx_product_stock_fk_product (fk_product); + +ALTER TABLE llx_product_stock ADD INDEX idx_product_stock_fk_entrepot (fk_entrepot); diff --git a/pgsql/tables/llx_product_stock.sql b/pgsql/tables/llx_product_stock.sql index 02df877a000..3a6a783d739 100644 --- a/pgsql/tables/llx_product_stock.sql +++ b/pgsql/tables/llx_product_stock.sql @@ -19,10 +19,9 @@ -- 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_product_stock.sql,v 1.7 2007/12/02 21:37:45 eldy Exp +-- Id: llx_product_stock.sql,v 1.8 2008/07/02 22:37:52 eldy Exp -- ============================================================================ - create table llx_product_stock ( rowid SERIAL PRIMARY KEY, @@ -32,6 +31,3 @@ create table llx_product_stock "reel" integer -- stock réel ); -CREATE INDEX idx_llx_product_stock_fk_product ON llx_product_stock (fk_product); -CREATE INDEX idx_llx_product_stock_fk_entrepot ON llx_product_stock (fk_entrepot); - diff --git a/pgsql/tables/llx_projet_task.sql b/pgsql/tables/llx_projet_task.sql index 2fffffe8a15..a0888fcb292 100644 --- a/pgsql/tables/llx_projet_task.sql +++ b/pgsql/tables/llx_projet_task.sql @@ -19,10 +19,9 @@ -- 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_projet_task.sql,v 1.2 2007/12/02 21:37:45 eldy Exp +-- Id: llx_projet_task.sql,v 1.3 2008/07/02 22:37:51 eldy Exp -- =========================================================================== - create table llx_projet_task ( rowid SERIAL PRIMARY KEY, @@ -33,9 +32,4 @@ create table llx_projet_task "fk_user_creat" integer, -- createur "statut" varchar(6) CHECK (statut IN ('open','closed')) DEFAULT 'open', "note" text - ); - -CREATE INDEX idx_llx_projet_task_fk_projet ON llx_projet_task (fk_projet); -CREATE INDEX idx_llx_projet_task_statut ON llx_projet_task (statut); -CREATE INDEX idx_llx_projet_task_fk_user_creat ON llx_projet_task (fk_user_creat); diff --git a/pgsql/tables/llx_projet_task_actors.sql b/pgsql/tables/llx_projet_task_actors.sql index 7739c9d6183..58c40aa6139 100644 --- a/pgsql/tables/llx_projet_task_actors.sql +++ b/pgsql/tables/llx_projet_task_actors.sql @@ -19,11 +19,10 @@ -- 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_projet_task_actors.sql,v 1.2 2007/12/02 21:37:45 eldy Exp +-- Id: llx_projet_task_actors.sql,v 1.3 2008/07/02 22:37:52 eldy Exp -- =========================================================================== - create table llx_projet_task_actors ( "fk_projet_task" integer NOT NULL, @@ -33,4 +32,3 @@ create table llx_projet_task_actors ); 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); diff --git a/pgsql/tables/llx_projet_task_time.sql b/pgsql/tables/llx_projet_task_time.sql index e77091c05ba..81cb69c8b71 100644 --- a/pgsql/tables/llx_projet_task_time.sql +++ b/pgsql/tables/llx_projet_task_time.sql @@ -19,11 +19,9 @@ -- 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_projet_task_time.sql,v 1.4 2007/12/02 21:37:45 eldy Exp +-- Id: llx_projet_task_time.sql,v 1.5 2008/07/02 22:37:52 eldy Exp -- =========================================================================== - - create table llx_projet_task_time ( rowid SERIAL PRIMARY KEY, @@ -33,6 +31,3 @@ create table llx_projet_task_time "fk_user" integer, "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_user ON llx_projet_task_time (fk_user); diff --git a/pgsql/tables/llx_stock_mouvement.key.sql b/pgsql/tables/llx_stock_mouvement.key.sql new file mode 100644 index 00000000000..64bae4f2e90 --- /dev/null +++ b/pgsql/tables/llx_stock_mouvement.key.sql @@ -0,0 +1,29 @@ +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2002-2004 Rodolphe Quiedeville +-- Copyright (C) 2004-2005 Laurent Destailleur +-- +-- 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_stock_mouvement.key.sql,v 1.1 2008/07/02 22:37:51 eldy Exp +-- ============================================================================ + + +ALTER TABLE llx_stock_mouvement ADD INDEX idx_stock_mouvement_fk_product (fk_product); + +ALTER TABLE llx_stock_mouvement ADD INDEX idx_stock_mouvement_fk_entrepot (fk_entrepot); diff --git a/pgsql/tables/llx_stock_mouvement.sql b/pgsql/tables/llx_stock_mouvement.sql index 0b2ddedccb3..6a675e3fb0e 100644 --- a/pgsql/tables/llx_stock_mouvement.sql +++ b/pgsql/tables/llx_stock_mouvement.sql @@ -19,10 +19,9 @@ -- 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_stock_mouvement.sql,v 1.7 2007/12/02 21:37:47 eldy Exp +-- Id: llx_stock_mouvement.sql,v 1.8 2008/07/02 22:37:52 eldy Exp -- ============================================================================ - create table llx_stock_mouvement ( rowid SERIAL PRIMARY KEY, @@ -36,6 +35,3 @@ create table llx_stock_mouvement "fk_user_author" integer ); -CREATE INDEX idx_llx_stock_mouvement_fk_product ON llx_stock_mouvement (fk_product); -CREATE INDEX idx_llx_stock_mouvement_fk_entrepot ON llx_stock_mouvement (fk_entrepot); - diff --git a/pgsql/tables/llx_stock_valorisation.key.sql b/pgsql/tables/llx_stock_valorisation.key.sql new file mode 100644 index 00000000000..1b12f4f8725 --- /dev/null +++ b/pgsql/tables/llx_stock_valorisation.key.sql @@ -0,0 +1,28 @@ +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2002-2004 Rodolphe Quiedeville +-- Copyright (C) 2004-2005 Laurent Destailleur +-- +-- 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_stock_valorisation.key.sql,v 1.1 2008/07/02 22:37:52 eldy Exp +-- ============================================================================ + + +ALTER TABLE llx_stock_valorisation ADD INDEX idx_stock_valorisation_fk_product (fk_product); + diff --git a/pgsql/tables/llx_stock_valorisation.sql b/pgsql/tables/llx_stock_valorisation.sql index 135fa5ac9fb..80c9c963c5e 100644 --- a/pgsql/tables/llx_stock_valorisation.sql +++ b/pgsql/tables/llx_stock_valorisation.sql @@ -19,10 +19,9 @@ -- 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_stock_valorisation.sql,v 1.2 2007/12/02 21:37:47 eldy Exp +-- Id: llx_stock_valorisation.sql,v 1.3 2008/07/02 22:37:52 eldy Exp -- ============================================================================ - create table llx_stock_valorisation ( rowid SERIAL PRIMARY KEY, @@ -38,5 +37,3 @@ create table llx_stock_valorisation "fk_stock_mouvement" integer -- id du mouvement de stock ); -CREATE INDEX idx_llx_stock_valorisation_fk_product ON llx_stock_valorisation (fk_product); -