2
0
forked from Wavyzz/dolibarr

Fix: [task #146] Remove table llx_categorie_association

Conflicts:
	htdocs/install/mysql/migration/3.2.0-3.3.0.sql
This commit is contained in:
Regis Houssin
2012-10-08 19:27:02 +02:00
parent 67c41721f5
commit 0975918cc6
11 changed files with 235 additions and 350 deletions

View File

@@ -1,6 +1,6 @@
-- ============================================================================
-- Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
-- Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2009-2012 Regis Houssin <regis@dolibarr.fr>
--
-- 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
@@ -17,6 +17,7 @@
--
-- ============================================================================
ALTER TABLE llx_categorie ADD UNIQUE INDEX uk_categorie_ref (label,type,entity);
ALTER TABLE llx_categorie ADD UNIQUE INDEX uk_categorie_ref (entity, fk_parent, label, type);
ALTER TABLE llx_categorie ADD INDEX idx_categorie_type (type);
ALTER TABLE llx_categorie ADD INDEX idx_categorie_label (label);

View File

@@ -1,7 +1,7 @@
-- ============================================================================
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
-- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
-- Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
--
-- 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
@@ -21,13 +21,15 @@
create table llx_categorie
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
label varchar(255), -- category name
type tinyint DEFAULT 1 NOT NULL, -- category type (product, supplier, customer)
entity integer DEFAULT 1 NOT NULL, -- multi company id
description text, -- description of the category
fk_soc integer DEFAULT NULL, -- attribution of the category has a company (for product only)
visible tinyint DEFAULT 1 NOT NULL, -- determine if the products are visible or not
import_key varchar(14) -- Import key
entity integer DEFAULT 1 NOT NULL, -- multi company id
fk_parent integer DEFAULT 0 NOT NULL,
label varchar(255) NOT NULL, -- category name
type tinyint DEFAULT 1 NOT NULL, -- category type (product, supplier, customer)
description text, -- description of the category
fk_soc integer DEFAULT NULL, -- attribution of the category has a company (for product only)
visible tinyint DEFAULT 1 NOT NULL, -- determine if the products are visible or not
import_key varchar(14) -- Import key
)ENGINE=innodb;
--
@@ -37,11 +39,3 @@ create table llx_categorie
-- 1 : supplier
-- 2 : customer
--
--
-- List of codes for the field entity
--
-- 1 : first company category type
-- 2 : second company category type
-- 3 : etc...
--

View File

@@ -1,26 +0,0 @@
-- ============================================================================
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- 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_association ADD UNIQUE INDEX uk_categorie_association (fk_categorie_mere, fk_categorie_fille);
ALTER TABLE llx_categorie_association ADD UNIQUE INDEX uk_categorie_association_fk_categorie_fille (fk_categorie_fille);
ALTER TABLE llx_categorie_association ADD CONSTRAINT fk_categorie_asso_fk_categorie_mere FOREIGN KEY (fk_categorie_mere) REFERENCES llx_categorie (rowid);
ALTER TABLE llx_categorie_association ADD CONSTRAINT fk_categorie_asso_fk_categorie_fille FOREIGN KEY (fk_categorie_fille) REFERENCES llx_categorie (rowid);

View File

@@ -1,24 +0,0 @@
-- ============================================================================
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
--
-- 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/>.
--
-- ============================================================================
create table llx_categorie_association
(
fk_categorie_mere integer NOT NULL,
fk_categorie_fille integer NOT NULL
)ENGINE=innodb;