VbzCart/docs/tables/ctg updates
Jump to navigation
Jump to search
About
- Status: DISCARDED
- Purpose: There may be a better way to do this, but haven't been able to figure it out yet. This table keeps track of the correspondence between {items as generated from the catalog title group data} and {items in Template:Vbzcart}. Off the top of my head, I can't remember why we need to keep more fields than just ID_Item and IDS_Item, but I did look at this table very closely awhile back and ended up with all those extra fields still in it. TO DO: document why they're needed.
- Fields:
- isActive is necessary because otherwise there was no way to convey that a formerly-existing item is no longer active; while it should be possible to pull this information back out from Template:Vbzcart/query when updating Template:Vbzcart from Template:Vbzcart, the necessary join (showing all items in Template:Vbzcart not found in Template:Vbzcart/query) seems to take a prohibitively long time to run. Perhaps this can be optimized later, which would also eliminate the need for most of the fields in Template:Vbzcart.
- History:
- 2009-07-02 This does not seem to be necessary; it was never implemented on Rizzo, and catalog building has happened without it.
SQL
<section begin=sql /><mysql>CREATE TABLE `ctg_updates` (
ID_Item INT NOT NULL AUTO_INCREMENT COMMENT "cat_items.ID", IDS_Item VARCHAR(63) NOT NULL UNIQUE COMMENT "cat_titles.ID + CatSfx", isActive BOOL NOT NULL DEFAULT FALSE COMMENT "current sources do generate a record for this item", CatSfx VARCHAR(31) DEFAULT NULL COMMENT "suffix which uniquely identifies this item's genome, so to speak, within all items for the same title", CatNum VARCHAR(63) NOT NULL COMMENT "CatNum = Title.CatNum + CatSfx", ID_Title INT DEFAULT NULL, ID_CTG_Group INT DEFAULT NULL, ID_CTG_Title INT DEFAULT NULL, ID_CTG_Item INT DEFAULT NULL, ID_ItTyp INT DEFAULT NULL COMMENT "needed for join with cat_items, even though it comes from ID_CTG_Item", ID_ItOpt INT DEFAULT NULL COMMENT "needed for join with cat_items, even though it comes from ID_CTG_Item", PRIMARY KEY(`IDS_Item`), INDEX(`ID_Item`), INDEX(`CatNum`)
) ENGINE = MYISAM;</mysql> <section end=sql />