diff --git a/htdocs/install/mysql/tables/llx_categorie_fournisseur.key.sql b/htdocs/install/mysql/tables/llx_categorie_fournisseur.key.sql new file mode 100644 index 00000000000..0e5bde492d8 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_categorie_fournisseur.key.sql @@ -0,0 +1,24 @@ +-- ============================================================================ +-- Copyright (C) 2007 Patrick Raguin +-- +-- 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, see . +-- +-- ============================================================================ + +ALTER TABLE llx_categorie_fournisseur ADD PRIMARY KEY pk_categorie_fournisseur (fk_categorie, fk_societe); +ALTER TABLE llx_categorie_fournisseur ADD INDEX idx_categorie_fournisseur_fk_categorie (fk_categorie); +ALTER TABLE llx_categorie_fournisseur ADD INDEX idx_categorie_fournisseur_fk_societe (fk_societe); + +ALTER TABLE llx_categorie_fournisseur ADD CONSTRAINT fk_categorie_fournisseur_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid); +ALTER TABLE llx_categorie_fournisseur ADD CONSTRAINT fk_categorie_fournisseur_fk_soc FOREIGN KEY (fk_societe) REFERENCES llx_societe (rowid); diff --git a/htdocs/install/mysql/tables/llx_categorie_member.key.sql b/htdocs/install/mysql/tables/llx_categorie_member.key.sql index c85e4314344..3c00ab89fb9 100644 --- a/htdocs/install/mysql/tables/llx_categorie_member.key.sql +++ b/htdocs/install/mysql/tables/llx_categorie_member.key.sql @@ -18,7 +18,7 @@ -- -- ============================================================================ -ALTER TABLE llx_categorie_member ADD PRIMARY KEY (fk_categorie, fk_member); +ALTER TABLE llx_categorie_member ADD PRIMARY KEY pk_categorie_member (fk_categorie, fk_member); ALTER TABLE llx_categorie_member ADD INDEX idx_categorie_member_fk_categorie (fk_categorie); ALTER TABLE llx_categorie_member ADD INDEX idx_categorie_member_fk_member (fk_member); diff --git a/htdocs/install/mysql/tables/llx_categorie_product.key.sql b/htdocs/install/mysql/tables/llx_categorie_product.key.sql index 1084ad1722c..227aaf1c388 100644 --- a/htdocs/install/mysql/tables/llx_categorie_product.key.sql +++ b/htdocs/install/mysql/tables/llx_categorie_product.key.sql @@ -18,7 +18,7 @@ -- -- ============================================================================ -ALTER TABLE llx_categorie_product ADD PRIMARY KEY (fk_categorie, fk_product); +ALTER TABLE llx_categorie_product ADD PRIMARY KEY pk_categorie_product (fk_categorie, fk_product); ALTER TABLE llx_categorie_product ADD INDEX idx_categorie_product_fk_categorie (fk_categorie); ALTER TABLE llx_categorie_product ADD INDEX idx_categorie_product_fk_product (fk_product); diff --git a/htdocs/install/mysql/tables/llx_categorie_societe.key.sql b/htdocs/install/mysql/tables/llx_categorie_societe.key.sql index 6d833a5484a..d721e407d55 100644 --- a/htdocs/install/mysql/tables/llx_categorie_societe.key.sql +++ b/htdocs/install/mysql/tables/llx_categorie_societe.key.sql @@ -16,7 +16,7 @@ -- -- ============================================================================ -ALTER TABLE llx_categorie_societe ADD PRIMARY KEY (fk_categorie, fk_societe); +ALTER TABLE llx_categorie_societe ADD PRIMARY KEY pk_categorie_societe (fk_categorie, fk_societe); ALTER TABLE llx_categorie_societe ADD INDEX idx_categorie_societe_fk_categorie (fk_categorie); ALTER TABLE llx_categorie_societe ADD INDEX idx_categorie_societe_fk_societe (fk_societe);