VbzCart/docs/tables/cache log: Difference between revisions

From Woozle Writes Code
< VbzCart‎ | docs‎ | tables
Jump to navigation Jump to search
imported>Woozle
(New page: ==About== * '''Purpose''': Log of all cache updates performed * '''Notes''': ** The stored procedures don't automatically update this log; that is handled by the DataMgr classes. ==SQL== <...)
 
imported>Woozle
(got rid of redundant fields; added more user ID)
Line 3: Line 3:
* '''Notes''':
* '''Notes''':
** The stored procedures don't automatically update this log; that is handled by the DataMgr classes.
** The stored procedures don't automatically update this log; that is handled by the DataMgr classes.
*  '''History''':
** '''2009-03-24''' Belatedly realized that it makes no sense to log source and destination each time; running the procedure updates a preset destination (a given function always updates the same destination) from ''all'' the function's sources.
*** Also added VbzUser, SysUser, and Machine, while I'm here (to be consistent with {{vbzcart/table|event_log}}). Sure, some updates are automatic, but some aren't.
==SQL==
==SQL==
<section begin=sql /><mysql>DROP TABLE IF EXISTS `data_log`;
<section begin=sql /><mysql>DROP TABLE IF EXISTS `data_log`;
 
CREATE TABLE `data_log` (
    ID INT NOT NULL AUTO_INCREMENT  COMMENT "log line identifier",
    WhenStarted    DATETIME NOT NULL COMMENT "when this event was started",
    WhenFinished  DATETIME          COMMENT "when it was completed (NULL = it wasn't)",
    ID_Proc        INT NOT NULL      COMMENT "data_procs.ID of stored procedure used",
    Caller        VARCHAR(63)      COMMENT "identifying string from code which caused the update",
    VbzUser        VARCHAR(255)      COMMENT "VbzCart user, if any",
    SysUser        VARCHAR(127)      COMMENT "Computer username, if any",
    Machine        VARCHAR(64)      COMMENT "Network name (or IP address) of computer initiating the change, if any",
    Notes          VARCHAR(255)      COMMENT "historical human-created notes",
    PRIMARY KEY (`ID`)
) ENGINE = MYISAM;</mysql>
<section end=sql />
===old version===
Retired 2009-03-24
<mysql>DROP TABLE IF EXISTS `data_log`;
    
    
CREATE TABLE `data_log` (
CREATE TABLE `data_log` (
Line 17: Line 37:
     PRIMARY KEY (`ID`)
     PRIMARY KEY (`ID`)
  ) ENGINE = MYISAM;</mysql>
  ) ENGINE = MYISAM;</mysql>
<section end=sql />

Revision as of 23:56, 24 March 2009

About

  • Purpose: Log of all cache updates performed
  • Notes:
    • The stored procedures don't automatically update this log; that is handled by the DataMgr classes.
  • History:
    • 2009-03-24 Belatedly realized that it makes no sense to log source and destination each time; running the procedure updates a preset destination (a given function always updates the same destination) from all the function's sources.
      • Also added VbzUser, SysUser, and Machine, while I'm here (to be consistent with Template:Vbzcart/table). Sure, some updates are automatic, but some aren't.

SQL

<section begin=sql /><mysql>DROP TABLE IF EXISTS `data_log`;

CREATE TABLE `data_log` (

   ID INT NOT NULL AUTO_INCREMENT   COMMENT "log line identifier",
   WhenStarted    DATETIME NOT NULL COMMENT "when this event was started",
   WhenFinished   DATETIME          COMMENT "when it was completed (NULL = it wasn't)",
   ID_Proc        INT NOT NULL      COMMENT "data_procs.ID of stored procedure used",
   Caller         VARCHAR(63)       COMMENT "identifying string from code which caused the update",
   VbzUser        VARCHAR(255)      COMMENT "VbzCart user, if any",
   SysUser        VARCHAR(127)      COMMENT "Computer username, if any",
   Machine        VARCHAR(64)       COMMENT "Network name (or IP address) of computer initiating the change, if any",
   Notes          VARCHAR(255)      COMMENT "historical human-created notes",
   PRIMARY KEY (`ID`)
) ENGINE = MYISAM;</mysql>

<section end=sql />

old version

Retired 2009-03-24 <mysql>DROP TABLE IF EXISTS `data_log`;

CREATE TABLE `data_log` (

   ID INT NOT NULL AUTO_INCREMENT COMMENT "log line identifier",
   WhenStarted DATETIME NOT NULL COMMENT "when this event was started",
   WhenFinished DATETIME COMMENT "when it was completed",
   ID_TableDest INT NOT NULL COMMENT "data_tables.ID of table being updated",
   ID_TableSrce INT NOT NULL COMMENT "data_tables.ID of triggering/source table",
   ID_Proc INT NOT NULL COMMENT "data_procs.ID of stored procedure used",
   Caller varchar(63) COMMENT "identifying string from code which caused the update",
   Notes varchar(255) COMMENT "historical human-created notes",
   PRIMARY KEY (`ID`)
) ENGINE = MYISAM;</mysql>