VbzCart/tables/stk bin history

From HTYP, the free directory anyone can edit

Jump to: navigation, search

[edit] About

  • Purpose: Documents things which happen to a stock bin -- usually changes to stk_bins data, but can also log collective movement of items to/from bins
  • History:
    • 2009-11-07 Added "Descr" field and made ID_Srce/ID_Dest NOT NULL
    • 2009-12-20 Added fields WhoAdmin, WhoSystem, WhoNetwork
  • Fields:
    • Descr is for events other than moving, e.g. field changes or stock recounts

[edit] SQL

DROP TABLE IF EXISTS `stk_bin_history`;
CREATE TABLE `stk_bin_history` (
  `ID`                      INT NOT NULL AUTO_INCREMENT,
  `ID_Bin`                  INT NOT NULL COMMENT "stk_bins.ID of bin being moved",
  `WhenDone`           DATETIME NOT NULL COMMENT "when the move happened",
  `WhoAdmin`   VARCHAR(127)     NOT NULL COMMENT "VbzCart admin username",
  `WhoSystem`  VARCHAR(127) DEFAULT NULL COMMENT "who logged into the operating system, if using non-web client app",
  `WhoNetwork` VARCHAR(64)      NOT NULL COMMENT "network name or IP address of client machine",
  `ID_Srce`                 INT NOT NULL COMMENT "stk_places.ID of where the bin came from (NULL = new bin)",
  `ID_Dest`                 INT NOT NULL COMMENT "stk_places.ID of where the bin was moved to (NULL = bin destroyed)",
  `Descr`      VARCHAR(255) DEFAULT NULL COMMENT "code-generated description for non-move events",
  `Notes`      VARCHAR(255) DEFAULT NULL COMMENT "optional explanatory notes",
  PRIMARY KEY(`ID`)
) ENGINE = MYISAM;
Personal tools