Difference between revisions of "VbzCart/tables/event vc legacy"
Jump to navigation
Jump to search
(first pass) |
m (Woozle moved page Ferreteria/sql/event legacy to VbzCart/tables/event vc legacy without leaving a redirect: realized belatedly that this is VbzCart-specific) |
(No difference)
|
Revision as of 20:54, 10 April 2017
About
- Purpose: dependent table for integrating other event-logging tables into the EventPlex system
- This particular table is based on VbzCart/tables/event log, but could be adapted for importing events from other systems.
- Depends on: event
Migration
Here's what happens to the various event_log fields:
- ID is renamed to ID_Event (I'm using the same IDs because I can get away with it, thus making it unnecessary to write PHP code for importing)
- Timestamps: see event_done section below
- WhenStarted -> event.WhenStart
- WhenFinished -> event_done.WhenFinish
- WhatSQL was never used, so dropped
- Table/Row identifiers: when set, an event_in_table record is created.
- ModType -> event_in_table.TableKey
- ModIndex -> event_in_table.TableRow
- EvWhere is unaltered
- Params is unaltered
- Descr -> event.Descrip
- DescrFin -> event_done.Descrip
- Code: "legacy." is prepended, and result used for event.TypeCode
- WhoAdmin is unaltered
- WhoSystem is unaltered
- WhoNetwork is unaltered
- isError is unaltered
- isSevere is unaltered
- isDebug is unaltered
- Notes -> event_notes.Notes
event_done
Some early records have WhenFinished set but not WhenStarted, or DescrFin but not WhenFinished.
- If WhenFinished is set but WhenStarted isn't, WhenFinished values are moved to WhenStarted.
- When WhenStarted and WhenFinished are set, or DescrFin is set, an event_done record is created.
- When DescrFin is set but WhenFinished isn't, then WhenStart is used for WhenFinished.
History
- 2017-04-10 Created because I am a data-hoarder.
SQL
<mysql>CREATE TABLE `event_legacy` (
ID_Event INT NOT NULL COMMENT "event.ID of parent event", EvWhere VARCHAR(255) COMMENT "where in the code the event happened (suitable for filtering)", Params VARCHAR(255) DEFAULT NULL COMMENT "any relevant parameters", WhoAdmin VARCHAR(127) COMMENT "VbzCart username", WhoSystem VARCHAR(127) COMMENT "who logged into the operating system on the client machine", WhoNetwork VARCHAR(64) COMMENT "network name or IP address of client system from which the event was initiated", isError TINYINT(1) COMMENT "FALSE = this is just a message or normal event; TRUE = there is a problem to fix", isSevere TINYINT(1) COMMENT "TRUE = important enough to send email to admin immediately", isDebug TINYINT(1) DEFAULT FALSE COMMENT "TRUE = generated during debugging -- don't normally show in reports", PRIMARY KEY (`ID_Event`) ) ENGINE = InnoDB;</mysql>