VbzCart/tables/cat images

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< VbzCart‎ | tables
Revision as of 15:48, 6 December 2008 by Woozle (talk | contribs) (extracted from "tables" page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

  • Purpose: Stores data for images relevant to displaying catalog entities (currently only Titles)
  • Fields:
    • Spec can either be the official location of the file or can be updated from FileFerret using the IDFF data. It should eventually be renamed to something like LocalSpec, StorSpec, SrcSpec...
    • WebSpec should be considered the official location for the purposes of page display; only image admin functions should update it.
    • FileFerret columns:
      • IDFF_File should always be set; this way, the file can be located if it gets moved. NOT NULL isn't required, though, because it may be necessary to find the file first and later request a FileFerret ID for it.
      • IDFF_Fideal is set opportunistically, for now. Later on we may want to have a policy that all VbzCart images should have a Fideal, but this will be determined as FileFerret is worked out.
  • Future: I had boldly planned to use FileFerret to manage image files, and towards that end had boldly removed any actual filespec information from this table, but then later realized that this was placing too much tight dependency on another entire subsystem. Eventually the filespec fields need to be restored and FileFerret should be relegated to keeping them updated if things are moved.

SQL

<mysql> CREATE TABLE `cat_images` (

 `ID` INT NOT NULL AUTO_INCREMENT,
 isActive BOOL NOT NULL DEFAULT FALSE,
 `Spec`    varchar(255) NOT NULL COMMENT 'relative filespec to image file on client system',
 `WebSpec` varchar(255) NOT NULL COMMENT 'relative filespec to image file on web server',
 `ID_Title`    INT NOT NULL      COMMENT 'titles.ID of title to which this image applies',
 `Ab_Size`     varchar(7)        COMMENT 'ImgSizes.Ab: abbreviation for image size class',
 `AttrFldr`    varchar(15)       COMMENT 'folder (key) name for images with this attribute',
 `AttrDispl`   varchar(64)       COMMENT 'description to display (e.g. in image tooltip) for this attribute',
 `AttrSort`    varchar(15)       COMMENT 'sorting order for this attribute',
 `IDFF_File`   INT DEFAULT NULL  COMMENT "FileFerret.Files.ID",
 `IDFF_Fideal` INT DEFAULT NULL  COMMENT "FileFerret.Fideals.ID",
 PRIMARY KEY(`ID`)
)
ENGINE = MYISAM;</mysql>