Difference between revisions of "VbzCart/tables/ctg groups"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(clarified explanations, updated terminology; ID_Redir tentatively deprecated)
(tidying and updating)
 
Line 1: Line 1:
 
==About==
 
==About==
* '''Purpose''': Master list of Catalog Management Groups (CMGs, aka TGroups) -- see [[VbzCart/catalog/building]]
+
* '''Purpose''': Master list of Supplier Catalog Management Groups (SCMGs) -- see [[VbzCart/pieces/catalog/building]]
 
* '''Fields''':
 
* '''Fields''':
 
** '''ID_Supplier''': supplier to which this group applies; NULL = no fixed supplier, can be used for any of them
 
** '''ID_Supplier''': supplier to which this group applies; NULL = no fixed supplier, can be used for any of them
** '''ID_Redir''': ctg_groups.ID -- if not null, redirect all references to the current ID to use ID_Redir instead. This is used to indicate a disused CMG (at the moment, I can't remember why it was better to do this than to just edit the existing CMG, but I'm sure there was a reason).
+
** '''ID_Redir''': ctg_groups.ID -- if not null, redirect all references to the current ID to use ID_Redir instead. This is used to indicate a disused SCMG (at the moment, I can't remember why it was better to do this than to just edit the existing SCMG, but I'm sure there was a reason).
* '''Future''': It may be that ID_Redir isn't really a useful thing to have. For now (2010-11-17), I'm not going to bother making it editable in the administration screen for this table.
+
* '''Future''': It may be that ID_Redir isn't really a useful thing to have. For now (2010-11-17), I'm not going to bother making it editable in the administration form.
 
==SQL==
 
==SQL==
<section begin=sql /><mysql>CREATE TABLE `ctg_groups` (
+
<mysql>CREATE TABLE `ctg_groups` (
 
   ID          INT NOT NULL AUTO_INCREMENT,
 
   ID          INT NOT NULL AUTO_INCREMENT,
   ID_Supplier INT DEFAULT NULL COMMENT "cat_supp.ID to which this CMG uniquely applies",
+
   ID_Supplier INT DEFAULT NULL COMMENT "cat_supp.ID to which this SCMG uniquely applies",
 
   Name        VARCHAR(63) DEFAULT NULL COMMENT "Name of this group (brief)",
 
   Name        VARCHAR(63) DEFAULT NULL COMMENT "Name of this group (brief)",
 
   Descr      VARCHAR(127) DEFAULT NULL COMMENT "Description (for display; if NULL, use ItemType fields)",
 
   Descr      VARCHAR(127) DEFAULT NULL COMMENT "Description (for display; if NULL, use ItemType fields)",
Line 14: Line 14:
 
   Code        VARCHAR(7) DEFAULT NULL COMMENT "suffix for cat_items.CatNum",
 
   Code        VARCHAR(7) DEFAULT NULL COMMENT "suffix for cat_items.CatNum",
 
   Sort        VARCHAR(31) DEFAULT NULL COMMENT "sorting key within group list",
 
   Sort        VARCHAR(31) DEFAULT NULL COMMENT "sorting key within group list",
   ID_Redir    INT DEFAULT NULL COMMENT "ctg_groups.ID of CMG to use instead of this one",
+
   ID_Redir    INT DEFAULT NULL COMMENT "ctg_groups.ID of SCMG to use instead of this one",
 
PRIMARY KEY(`ID`)
 
PRIMARY KEY(`ID`)
 
)
 
)
 
ENGINE = MYISAM;</mysql>
 
ENGINE = MYISAM;</mysql>
<section end=sql />
 

Latest revision as of 20:35, 1 February 2016

About

  • Purpose: Master list of Supplier Catalog Management Groups (SCMGs) -- see VbzCart/pieces/catalog/building
  • Fields:
    • ID_Supplier: supplier to which this group applies; NULL = no fixed supplier, can be used for any of them
    • ID_Redir: ctg_groups.ID -- if not null, redirect all references to the current ID to use ID_Redir instead. This is used to indicate a disused SCMG (at the moment, I can't remember why it was better to do this than to just edit the existing SCMG, but I'm sure there was a reason).
  • Future: It may be that ID_Redir isn't really a useful thing to have. For now (2010-11-17), I'm not going to bother making it editable in the administration form.

SQL

<mysql>CREATE TABLE `ctg_groups` (

 ID          INT NOT NULL AUTO_INCREMENT,
 ID_Supplier INT DEFAULT NULL COMMENT "cat_supp.ID to which this SCMG uniquely applies",
 Name        VARCHAR(63) DEFAULT NULL COMMENT "Name of this group (brief)",
 Descr       VARCHAR(127) DEFAULT NULL COMMENT "Description (for display; if NULL, use ItemType fields)",
 isActive    BOOL DEFAULT FALSE,
 Code        VARCHAR(7) DEFAULT NULL COMMENT "suffix for cat_items.CatNum",
 Sort        VARCHAR(31) DEFAULT NULL COMMENT "sorting key within group list",
 ID_Redir    INT DEFAULT NULL COMMENT "ctg_groups.ID of SCMG to use instead of this one",

PRIMARY KEY(`ID`) ) ENGINE = MYISAM;</mysql>