VbzCart/tables/event vc legacy

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

About

  • Purpose: dependent table for integrating other event-logging tables into the EventPlex system
    • This particular table is based on event_log, but could be adapted for importing events from other systems.
  • Depends on: sql/event in Ferreteria

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

CREATE TABLE `event_vc_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;