FinanceFerret/2.0/sql/event
< FinanceFerret | 2.0 | sql
Jump to navigation
Jump to search
About
- Version: Copied, with only slight changes, from VbzCart tables. This version is suitable for re-use in other projects, but perhaps should be renamed EventLog or Events because the MySQL syntax highlighter thinks "log" is a keyword.
- 2009-08-30: suggest LogEvent ("Log" as prefix so all log tables are together, type of log as singular)
- Notes
- Have to use "Ev" prefix for field names because When and Where are keywords.
SQL
<section begin=sql /><mysql>DROP TABLE IF EXISTS `Event Log`; CREATE TABLE `Event Log` (
ID INT NOT NULL AUTO_INCREMENT COMMENT "log line identifier", EvWhen DATETIME NOT NULL COMMENT "when the event started", EvWhere varchar(255) COMMENT "where in the code the event happened (suitable for filtering)", Params varchar(255) COMMENT "any relevant parameters", Descr varchar(255) COMMENT "description of event", Code INT DEFAULT NULL COMMENT "numeric event code unique to location (EvWhere)", AppUser varchar(127) COMMENT "application username, for when we have a user-security system", SysUser varchar(127) COMMENT "who logged into the operating system (username)", Machine varchar(64) COMMENT "network name of machine from which the event was initiated, if applicable", isError BOOL COMMENT "FALSE = this is just a message or normal event; TRUE = there is a problem to fix (error)", isSevere BOOL COMMENT "TRUE = important enough to send email to admin immediately", Notes varchar(255) DEFAULT NULL COMMENT "manually-entered notes", PRIMARY KEY (`ID`) ) ENGINE = MYISAM;</mysql>
<section end=sql />