VbzCart/docs/tables/cat depts: Difference between revisions

From Woozle Writes Code
< VbzCart‎ | docs‎ | tables
Jump to navigation Jump to search
imported>Woozle
(extracted from "tables" page)
 
imported>Woozle
(this table should eventually go away)
Line 1: Line 1:
==About==
==About==
* '''Purpose''': catalog departments within a supplier. Not all suppliers split things into departments, but they still need one department record with a NULL PageKey.
* '''Purpose''': catalog departments within a supplier. Not all suppliers split things into departments, but they still need one department record with a NULL PageKey.
* '''Future''': This table should eventually go away, and its functionality replaced by Topics. If there are still any suppliers that use departments consistently as part of their catalog numbers, then we'll find a way to handle that using special topic fields.
==SQL==
==SQL==
<section begin=sql /><mysql> CREATE TABLE `cat_depts` (
<section begin=sql /><mysql> CREATE TABLE `cat_depts` (

Revision as of 01:47, 6 November 2010

About

  • Purpose: catalog departments within a supplier. Not all suppliers split things into departments, but they still need one department record with a NULL PageKey.
  • Future: This table should eventually go away, and its functionality replaced by Topics. If there are still any suppliers that use departments consistently as part of their catalog numbers, then we'll find a way to handle that using special topic fields.

SQL

<section begin=sql /><mysql> CREATE TABLE `cat_depts` (

  `ID` INT  NOT NULL AUTO_INCREMENT,
  `Name` varchar(64) COMMENT 'name of department as displayed',
  `ID_Supplier` INT DEFAULT NULL COMMENT 'cat_suppliers.ID',
  `isActive` BOOL COMMENT 'items.ID' COMMENT 'department is available for adding titles',
  `Sort` varchar(8) COMMENT 'listing order; default to CatKey',
  `CatKey` varchar(4) COMMENT 'use for building title catalog numbers',
  `PageKey` varchar(4) COMMENT 'use for building URL of Dept page',
  `Descr` varchar(255) COMMENT 'descriptive text for Dept page',
  PRIMARY KEY(`ID`)
)
ENGINE = MYISAM;</mysql>

<section end=sql />