VbzCart/docs/tables/ctg titles: Difference between revisions
Jump to navigation
Jump to search
imported>Woozle (removing and renaming) |
imported>Woozle (making ID_Title NOT NULL; corrected explanation) |
||
| Line 1: | Line 1: | ||
==About== | ==About== | ||
* '''Purpose''': | * '''Purpose''': represents the availability of a Local Catalog Title from a particular Supplier Source (catalog), in a particular Group (set of types/options/prices) | ||
* '''Procedure''': Any new Titles in a given Source must be entered into the Local Catalog before they can be used here. | |||
* '''Future''': Rename '''ID_Title''' field to '''ID_LCTitle''', for disambiguation. Maybe ID_Group and ID_Source should be ID_SCGroup and ID_SCSource, for consistency. | * '''Future''': Rename '''ID_Title''' field to '''ID_LCTitle''', for disambiguation. Maybe ID_Group and ID_Source should be ID_SCGroup and ID_SCSource, for consistency. | ||
==Fields== | ==Fields== | ||
* '''ID_Title''': | * '''ID_Title''': the Local Catalog Title for which this record represents availability from a Source | ||
* '''Code''': Still reconstructing what this is for. | * '''Code''': Still reconstructing what this is for. | ||
* '''Descr''': Still reconstructing what this is for. | * '''Descr''': Still reconstructing what this is for. Schema comment said "required if Code is used", but it is often NULL when Code is not NULL -- so changing that to "recommended if Code is used". | ||
==History== | ==History== | ||
* '''2016-02-04''' | * '''2016-02-04''' | ||
** Removing '''GroupSort''' -- I'm still figuring out how the former Group* fields are supposed to be used, and GroupSort is NULL in all existing records. If it's ever needed, document how it is supposed to work. | ** Removing '''GroupSort''' -- I'm still figuring out how the former Group* fields are supposed to be used, and GroupSort is NULL in all existing records. If it's ever needed, document how it is supposed to work. | ||
** Renaming '''GroupCode''' and '''GroupDescr''' to '''Code''' and '''Descr''' to be consistent with naming in {{l/vc/table|ctg_groups}}. | ** Renaming '''GroupCode''' and '''GroupDescr''' to '''Code''' and '''Descr''' to be consistent with naming in {{l/vc/table|ctg_groups}}. | ||
** Changing ID_Title to NOT NULL. | |||
==SQL== | ==SQL== | ||
<mysql>CREATE TABLE `ctg_titles` ( | <mysql>CREATE TABLE `ctg_titles` ( | ||
ID INT NOT NULL AUTO_INCREMENT, | ID INT NOT NULL AUTO_INCREMENT, | ||
ID_Title INT | ID_Title INT NOT NULL COMMENT "cat_titles.ID", | ||
ID_Group INT DEFAULT NULL COMMENT "ctg_groups.ID", | ID_Group INT DEFAULT NULL COMMENT "ctg_groups.ID", | ||
ID_Source | ID_Source INT DEFAULT NULL COMMENT "ctg_sources.ID - source which enables this selection", | ||
WhenDiscont DATETIME DEFAULT NULL COMMENT "non-sourced discontinuation", | WhenDiscont DATETIME DEFAULT NULL COMMENT "non-sourced discontinuation", | ||
Code VARCHAR(7) DEFAULT NULL COMMENT "optional catalog code extension", | Code VARCHAR(7) DEFAULT NULL COMMENT "optional catalog code extension", | ||
Descr VARCHAR(127) DEFAULT NULL COMMENT "description extension (recommended if Code is used)", | Descr VARCHAR(127) DEFAULT NULL COMMENT "description extension (recommended if Code is used)", | ||
isActive BOOL DEFAULT FALSE COMMENT "this group-title membership is active?", | isActive BOOL DEFAULT FALSE COMMENT "this group-title membership is active?", | ||
Supp_CatNum VARCHAR(15) DEFAULT NULL COMMENT "catalog # for restock from supplier", | Supp_CatNum VARCHAR(15) DEFAULT NULL COMMENT "catalog # for restock from supplier", | ||
Notes VARCHAR(255) DEFAULT NULL COMMENT "notes about this particular title's availability in this group", | Notes VARCHAR(255) DEFAULT NULL COMMENT "notes about this particular title's availability in this group", | ||
PRIMARY KEY(`ID`) | PRIMARY KEY(`ID`) | ||
) | ) | ||
ENGINE = MYISAM;</mysql> | ENGINE = MYISAM;</mysql> | ||
Revision as of 15:51, 4 February 2016
About
- Purpose: represents the availability of a Local Catalog Title from a particular Supplier Source (catalog), in a particular Group (set of types/options/prices)
- Procedure: Any new Titles in a given Source must be entered into the Local Catalog before they can be used here.
- Future: Rename ID_Title field to ID_LCTitle, for disambiguation. Maybe ID_Group and ID_Source should be ID_SCGroup and ID_SCSource, for consistency.
Fields
- ID_Title: the Local Catalog Title for which this record represents availability from a Source
- Code: Still reconstructing what this is for.
- Descr: Still reconstructing what this is for. Schema comment said "required if Code is used", but it is often NULL when Code is not NULL -- so changing that to "recommended if Code is used".
History
- 2016-02-04
- Removing GroupSort -- I'm still figuring out how the former Group* fields are supposed to be used, and GroupSort is NULL in all existing records. If it's ever needed, document how it is supposed to work.
- Renaming GroupCode and GroupDescr to Code and Descr to be consistent with naming in Template:L/vc/table.
- Changing ID_Title to NOT NULL.
SQL
<mysql>CREATE TABLE `ctg_titles` (
ID INT NOT NULL AUTO_INCREMENT, ID_Title INT NOT NULL COMMENT "cat_titles.ID", ID_Group INT DEFAULT NULL COMMENT "ctg_groups.ID", ID_Source INT DEFAULT NULL COMMENT "ctg_sources.ID - source which enables this selection", WhenDiscont DATETIME DEFAULT NULL COMMENT "non-sourced discontinuation", Code VARCHAR(7) DEFAULT NULL COMMENT "optional catalog code extension", Descr VARCHAR(127) DEFAULT NULL COMMENT "description extension (recommended if Code is used)", isActive BOOL DEFAULT FALSE COMMENT "this group-title membership is active?", Supp_CatNum VARCHAR(15) DEFAULT NULL COMMENT "catalog # for restock from supplier", Notes VARCHAR(255) DEFAULT NULL COMMENT "notes about this particular title's availability in this group", PRIMARY KEY(`ID`)
) ENGINE = MYISAM;</mysql>