Difference between revisions of "VbzCart/tables/stk bin history"
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
|  (extracted from VbzCart/tables) |  (11/7 changes; started documentation section) | ||
| Line 1: | Line 1: | ||
| ==About== | ==About== | ||
| − | ''to  | + | * '''Purpose''': Documents changes to {{vbzcart|table|stk_bin}} data | 
| + | * '''History''': | ||
| + | ** '''2009-11-07''' Added "Descr" field and made ID_Srce/ID_Dest NOT NULL | ||
| + | * '''Fields''': | ||
| + | ** '''Descr''' is for events other than moving, e.g. field changes or stock recounts | ||
| ==SQL== | ==SQL== | ||
| <section begin=sql /><mysql>DROP TABLE IF EXISTS `stk_bin_history`; | <section begin=sql /><mysql>DROP TABLE IF EXISTS `stk_bin_history`; | ||
| − | |||
| CREATE TABLE `stk_bin_history` ( | CREATE TABLE `stk_bin_history` ( | ||
| − |    `ID` INT  | + |    `ID` INT                 NOT NULL AUTO_INCREMENT, | 
| − |    `ID_Bin` INT NOT NULL COMMENT "stk_bins.ID of bin being moved", | + |    `ID_Bin`             INT NOT NULL COMMENT "stk_bins.ID of bin being moved", | 
| − |    `WhenDone` DATETIME NOT NULL COMMENT "when the move happened", | + |    `WhenDone`      DATETIME NOT NULL COMMENT "when the move happened", | 
| − |    `ID_Srce` INT COMMENT "stk_places.ID of where the bin came from (NULL = new bin)", | + |    `ID_Srce`            INT NOT NULL COMMENT "stk_places.ID of where the bin came from (NULL = new bin)", | 
| − |    `ID_Dest` INT COMMENT "stk_places.ID of where the bin was moved to (NULL = bin destroyed)", | + |    `ID_Dest`            INT NOT NULL COMMENT "stk_places.ID of where the bin was moved to (NULL = bin destroyed)", | 
| − |    `Notes`  | + |   `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`) |    PRIMARY KEY(`ID`) | ||
| ) ENGINE = MYISAM;</mysql> | ) ENGINE = MYISAM;</mysql> | ||
| <section end=sql /> | <section end=sql /> | ||
Revision as of 23:07, 7 November 2009
About
- Purpose: Documents changes to stk_bin data
- History:
- 2009-11-07 Added "Descr" field and made ID_Srce/ID_Dest NOT NULL
 
- Fields:
- Descr is for events other than moving, e.g. field changes or stock recounts
 
SQL
<mysql>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", `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;</mysql>