Difference between revisions of "VbzCart/tables/ord event"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(+WhatCode)
(tagging as obsolete; minor tidying)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{hdr/status/obsolete}}
 
==About==
 
==About==
 
* '''Purpose''': for tracking internally-generated events which (generally) do not affect the order's status
 
* '''Purpose''': for tracking internally-generated events which (generally) do not affect the order's status
 +
* '''Status''': obsolete, no longer available
 
* '''History''':
 
* '''History''':
 
** '''2009-10-18''' Created
 
** '''2009-10-18''' Created
 +
** '''2010-09-24''' Merged into {{vbzcart|table|event_log}} and renamed so it can't be used; to be deleted
 
* '''Fields''':
 
* '''Fields''':
 
** '''VbzUser''' is the user's wiki username, and only applies to events initiated through the wiki user interface
 
** '''VbzUser''' is the user's wiki username, and only applies to events initiated through the wiki user interface
 
==SQL==
 
==SQL==
<section begin=sql /><mysql>CREATE TABLE `ord_event` (
+
<mysql>CREATE TABLE `ord_event` (
 
   `ID`            INT        NOT NULL AUTO_INCREMENT,
 
   `ID`            INT        NOT NULL AUTO_INCREMENT,
 
   `ID_Ord`        INT        NOT NULL COMMENT "core_orders.ID",
 
   `ID_Ord`        INT        NOT NULL COMMENT "core_orders.ID",
   `WhenDone`  DATETIME                 COMMENT "when the event happened",
+
   `WhenDone`  DATETIME         NOT NULL COMMENT "when the event happened",
 
   `WhatCode`  VARCHAR(7)      NOT NULL COMMENT "informal event type code",
 
   `WhatCode`  VARCHAR(7)      NOT NULL COMMENT "informal event type code",
 
   `VbzUser`  VARCHAR(127)              COMMENT "VbzCart username of whoever initiated the event, if available",
 
   `VbzUser`  VARCHAR(127)              COMMENT "VbzCart username of whoever initiated the event, if available",
 
   `SysUser`  VARCHAR(127)              COMMENT "who logged into the operating system, if available",
 
   `SysUser`  VARCHAR(127)              COMMENT "who logged into the operating system, if available",
   `Machine`  VARCHAR(63)               COMMENT "network name or IP address of client",
+
   `Machine`  VARCHAR(63)     NOT NULL COMMENT "network name or IP address of client",
 
   `Descr`    VARCHAR(255) DEFAULT NULL COMMENT "human-readable description of what happened",
 
   `Descr`    VARCHAR(255) DEFAULT NULL COMMENT "human-readable description of what happened",
 
   `Notes`    VARCHAR(255) DEFAULT NULL COMMENT "human-entered notes, if needed",
 
   `Notes`    VARCHAR(255) DEFAULT NULL COMMENT "human-entered notes, if needed",
Line 19: Line 22:
 
)
 
)
 
ENGINE = MYISAM;</mysql>
 
ENGINE = MYISAM;</mysql>
<section end=sql />
+
==Merging Into event_log==
 +
Fields to copy when merging this table into {{vbzcart|table|event_log}}:
 +
* '''event_log''' &larr; '''ord_event'''
 +
* WhenFinished &larr; WhenDone
 +
* ModType &larr; "ord"
 +
* ModIndex &larr; ID_Ord
 +
* EvWhere &larr; WhatCode (this is a bit of a kluge)
 +
* Descr &larr; Descr
 +
* WhoAdmin &larr; VbzUser
 +
* WhoSystem &larr; SysUser
 +
* WhoNetwork &larr; Machine
 +
* Notes &larr; Notes
 +
===SQL===
 +
<mysql>INSERT INTO `event_log` (
 +
  WhenFinished,
 +
  ModType,
 +
  ModIndex,
 +
  EvWhere,
 +
  Descr,
 +
  WhoAdmin,
 +
  WhoSystem,
 +
  WhoNetwork,
 +
  Notes)
 +
SELECT
 +
  WhenDone,
 +
  "ord",
 +
  ID_Ord,
 +
  WhatCode,
 +
  Descr,
 +
  VbzUser,
 +
  SysUser,
 +
  Machine,
 +
  Notes
 +
FROM `ord_event`;</mysql>

Latest revision as of 10:29, 1 June 2017

This documentation is obsolete, and is being kept solely for archival purposes.

About

  • Purpose: for tracking internally-generated events which (generally) do not affect the order's status
  • Status: obsolete, no longer available
  • History:
    • 2009-10-18 Created
    • 2010-09-24 Merged into event_log and renamed so it can't be used; to be deleted
  • Fields:
    • VbzUser is the user's wiki username, and only applies to events initiated through the wiki user interface

SQL

<mysql>CREATE TABLE `ord_event` (

 `ID`             INT         NOT NULL AUTO_INCREMENT,
 `ID_Ord`         INT         NOT NULL COMMENT "core_orders.ID",
 `WhenDone`  DATETIME         NOT NULL COMMENT "when the event happened",
 `WhatCode`  VARCHAR(7)       NOT NULL COMMENT "informal event type code",
 `VbzUser`   VARCHAR(127)              COMMENT "VbzCart username of whoever initiated the event, if available",
 `SysUser`   VARCHAR(127)              COMMENT "who logged into the operating system, if available",
 `Machine`   VARCHAR(63)      NOT NULL COMMENT "network name or IP address of client",
 `Descr`     VARCHAR(255) DEFAULT NULL COMMENT "human-readable description of what happened",
 `Notes`     VARCHAR(255) DEFAULT NULL COMMENT "human-entered notes, if needed",
 PRIMARY KEY(`ID`)

) ENGINE = MYISAM;</mysql>

Merging Into event_log

Fields to copy when merging this table into event_log:

  • event_logord_event
  • WhenFinished ← WhenDone
  • ModType ← "ord"
  • ModIndex ← ID_Ord
  • EvWhere ← WhatCode (this is a bit of a kluge)
  • Descr ← Descr
  • WhoAdmin ← VbzUser
  • WhoSystem ← SysUser
  • WhoNetwork ← Machine
  • Notes ← Notes

SQL

<mysql>INSERT INTO `event_log` (

 WhenFinished,
 ModType,
 ModIndex,
 EvWhere,
 Descr,
 WhoAdmin,
 WhoSystem,
 WhoNetwork,
 Notes)

SELECT

 WhenDone,
 "ord",
 ID_Ord,
 WhatCode,
 Descr,
 VbzUser,
 SysUser,
 Machine,
 Notes

FROM `ord_event`;</mysql>