VbzCart/docs/archive/tables
Jump to navigation
Jump to search
updates
- Purpose: timestamps on tables so we know when update queries need to be run
- Status: probably superceded by data flow tables and procs
SQL
<section begin=sql /><mysql> CREATE TABLE `updates` (
`Name` varchar(32) NOT NULL COMMENT 'name of thing which gets updated', `Updated` datetime COMMENT 'when last updated', PRIMARY KEY(`Name`) ) ENGINE = MYISAM;</mysql>
<section end=sql />
Function to record an update (not tested): <section begin=sql /><mysql> CREATE PROCEDURE SetUpdate(IN iName varchar(32))
BEGIN REPLACE INTO updates(Name,Updated) values(iName, NOW()); END</mysql>
<section end=sql />