forked from Wavyzz/dolibarr
Fix: Primary keys must be named
Fix: Added missing constraints/index for suppliers categories
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
--
|
||||
-- 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 <http://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
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);
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user