diff --git a/htdocs/install/mysql/tables/llx_product_association.key.sql b/htdocs/install/mysql/tables/llx_product_association.key.sql new file mode 100755 index 00000000000..195d2464738 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_product_association.key.sql @@ -0,0 +1,24 @@ +-- ============================================================================ +-- Copyright (C) 2010 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_association ADD UNIQUE INDEX uk_product_association (fk_product_pere, fk_product_fils); + +ALTER TABLE llx_product_association ADD INDEX idx_product_association_fils (fk_product_fils); diff --git a/htdocs/install/mysql/tables/llx_product_association.sql b/htdocs/install/mysql/tables/llx_product_association.sql new file mode 100755 index 00000000000..bf540e3cb38 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_product_association.sql @@ -0,0 +1,29 @@ +-- ============================================================================ +-- Copyright (C) 2006 Rodolphe Quiedeville +-- Copyright (C) 2010 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$ +-- ============================================================================ + +create table llx_product_association +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_product_pere integer NOT NULL DEFAULT 0, -- id du produit maitre + fk_product_fils integer NOT NULL DEFAULT 0, -- id du sous-produit + qty double NULL +)type=innodb; +