From 26e25f18a1a1955adb61d6ebe59805a805113b18 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 7 Oct 2008 07:28:45 +0000 Subject: [PATCH] Added ability to assign a category of product to a customer --- mysql/migration/2.4.0-2.5.0.sql | 2 +- mysql/tables/llx_categorie.sql | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/mysql/migration/2.4.0-2.5.0.sql b/mysql/migration/2.4.0-2.5.0.sql index 287282a5d62..5eac7afec6c 100644 --- a/mysql/migration/2.4.0-2.5.0.sql +++ b/mysql/migration/2.4.0-2.5.0.sql @@ -34,4 +34,4 @@ alter table llx_rights_def modify column type varchar(1); ALTER TABLE `llx_commandedet` ADD column `date_start` DATETIME DEFAULT NULL, ADD `date_end` DATETIME DEFAULT NULL ; - +alter table llx_categorie add column fk_soc integer DEFAULT NULL after description; diff --git a/mysql/tables/llx_categorie.sql b/mysql/tables/llx_categorie.sql index c17edc2eaf4..31aa8bf6c91 100644 --- a/mysql/tables/llx_categorie.sql +++ b/mysql/tables/llx_categorie.sql @@ -1,7 +1,7 @@ -- ============================================================================ -- Copyright (C) 2005 Brice Davoleau -- Copyright (C) 2005 Matthieu Valleton --- Copyright (C) 2005-2006 Regis Houssin +-- Copyright (C) 2005-2008 Regis Houssin -- -- 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 @@ -23,8 +23,17 @@ create table llx_categorie ( rowid integer AUTO_INCREMENT PRIMARY KEY, - label VARCHAR(255), -- nom de la catégorie - description text, -- description de la catégorie - visible tinyint DEFAULT 1 NOT NULL, -- determine si les produits sont visible ou pas - type tinyint DEFAULT 1 NOT NULL -- Type de catégorie (product, supplier, societe) + label VARCHAR(255), -- category name + 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 + type tinyint DEFAULT 1 NOT NULL -- category type (product, supplier, customer) )type=innodb; + +-- +-- List of codes for the field type +-- +-- 0 : product +-- 1 : supplier +-- 2 : customer +-- \ No newline at end of file