diff --git a/mysql/tables/llx_entrepot_valorisation.sql b/mysql/tables/llx_entrepot_valorisation.sql index c0310797394..d5c4c4472fc 100644 --- a/mysql/tables/llx_entrepot_valorisation.sql +++ b/mysql/tables/llx_entrepot_valorisation.sql @@ -23,8 +23,7 @@ create table llx_entrepot_valorisation rowid integer AUTO_INCREMENT PRIMARY KEY, tms timestamp, -- date technique mise à jour automatiquement date_calcul date, -- date auquel a ete calcule la valeur - fk_entrepot integer UNSIGNED NOT NULL , - valo_pmp float(12,4), -- valoristaion du stock en PMP - key(fk_entrepot) + fk_entrepot integer UNSIGNED NOT NULL, + valo_pmp float(12,4) -- valoristaion du stock en PMP )type=innodb; diff --git a/mysql/tables/llx_product_fournisseur.key.sql b/mysql/tables/llx_product_fournisseur.key.sql new file mode 100644 index 00000000000..036736938b9 --- /dev/null +++ b/mysql/tables/llx_product_fournisseur.key.sql @@ -0,0 +1,25 @@ +-- ============================================================================ +-- 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$ +-- ============================================================================ + + +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/mysql/tables/llx_product_fournisseur.sql b/mysql/tables/llx_product_fournisseur.sql index 28f78bc06a3..cc8b5d066da 100644 --- a/mysql/tables/llx_product_fournisseur.sql +++ b/mysql/tables/llx_product_fournisseur.sql @@ -26,9 +26,6 @@ create table llx_product_fournisseur fk_product integer, fk_soc integer, ref_fourn varchar(30), - fk_user_author integer, - - key(fk_product), - key(fk_soc) + fk_user_author integer )type=innodb; diff --git a/mysql/tables/llx_product_stock.key.sql b/mysql/tables/llx_product_stock.key.sql new file mode 100644 index 00000000000..f80f2ed0cc9 --- /dev/null +++ b/mysql/tables/llx_product_stock.key.sql @@ -0,0 +1,25 @@ +-- ============================================================================ +-- 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$ +-- ============================================================================ + + +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/mysql/tables/llx_product_stock.sql b/mysql/tables/llx_product_stock.sql index 9bc5ff60e23..7f6d37e2875 100644 --- a/mysql/tables/llx_product_stock.sql +++ b/mysql/tables/llx_product_stock.sql @@ -24,9 +24,6 @@ create table llx_product_stock tms timestamp, fk_product integer NOT NULL, fk_entrepot integer NOT NULL, - reel integer, -- stock réel - - key(fk_product), - key(fk_entrepot) + reel integer -- stock réel )type=innodb; diff --git a/mysql/tables/llx_projet_task.sql b/mysql/tables/llx_projet_task.sql index a44cfdb14f0..74db517c152 100644 --- a/mysql/tables/llx_projet_task.sql +++ b/mysql/tables/llx_projet_task.sql @@ -27,10 +27,5 @@ create table llx_projet_task duration_effective real NOT NULL, fk_user_creat integer, -- createur statut enum('open','closed') DEFAULT 'open', - note text, - - key(fk_projet), - key(statut), - key(fk_user_creat) - + note text )type=innodb; diff --git a/mysql/tables/llx_projet_task_actors.sql b/mysql/tables/llx_projet_task_actors.sql index dd11e4cdf19..00feb6cca99 100644 --- a/mysql/tables/llx_projet_task_actors.sql +++ b/mysql/tables/llx_projet_task_actors.sql @@ -24,7 +24,5 @@ create table llx_projet_task_actors fk_user integer NOT NULL, role enum ('admin','read','acto','info') DEFAULT 'admin', - UNIQUE (fk_projet_task, fk_user), - key (role) - + UNIQUE (fk_projet_task, fk_user) )type=innodb; diff --git a/mysql/tables/llx_projet_task_time.sql b/mysql/tables/llx_projet_task_time.sql index d3e3d0d6bce..eb1e655bf1e 100644 --- a/mysql/tables/llx_projet_task_time.sql +++ b/mysql/tables/llx_projet_task_time.sql @@ -25,9 +25,5 @@ create table llx_projet_task_time task_date date, task_duration double, fk_user integer, - note text, - - key(fk_task), - key(fk_user) - + note text )type=innodb; diff --git a/mysql/tables/llx_stock_mouvement.key.sql b/mysql/tables/llx_stock_mouvement.key.sql new file mode 100644 index 00000000000..68e1d4f20e9 --- /dev/null +++ b/mysql/tables/llx_stock_mouvement.key.sql @@ -0,0 +1,25 @@ +-- ============================================================================ +-- 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$ +-- ============================================================================ + + +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/mysql/tables/llx_stock_mouvement.sql b/mysql/tables/llx_stock_mouvement.sql index 1c0296acdef..fb71ea6be54 100644 --- a/mysql/tables/llx_stock_mouvement.sql +++ b/mysql/tables/llx_stock_mouvement.sql @@ -28,9 +28,6 @@ create table llx_stock_mouvement value integer, price float(13,4) DEFAULT 0, type_mouvement smallint, - fk_user_author integer, - - key(fk_product), - key(fk_entrepot) + fk_user_author integer )type=innodb; diff --git a/mysql/tables/llx_stock_valorisation.key.sql b/mysql/tables/llx_stock_valorisation.key.sql new file mode 100644 index 00000000000..049d8419b24 --- /dev/null +++ b/mysql/tables/llx_stock_valorisation.key.sql @@ -0,0 +1,24 @@ +-- ============================================================================ +-- 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$ +-- ============================================================================ + + +ALTER TABLE llx_stock_valorisation ADD INDEX idx_stock_valorisation_fk_product (fk_product); + diff --git a/mysql/tables/llx_stock_valorisation.sql b/mysql/tables/llx_stock_valorisation.sql index 2ad40c9b917..1dbe72b591c 100644 --- a/mysql/tables/llx_stock_valorisation.sql +++ b/mysql/tables/llx_stock_valorisation.sql @@ -30,8 +30,6 @@ create table llx_stock_valorisation price_pmp float(12,4), -- valeur PMP de l'operation qty_stock float(9,3) DEFAULT 0, -- qunatite en stock valo_pmp float(12,4), -- valorisation du stock en PMP - fk_stock_mouvement integer, -- id du mouvement de stock - - key(fk_product) + fk_stock_mouvement integer -- id du mouvement de stock )type=innodb;