Ferret File System/v0.1/SQL/event: Difference between revisions
< Ferret File System | v0.1 | SQL
Jump to navigation
Jump to search
(Created page with "==About== * '''purpose''': root events table -- all task-specific events tables refer to this one ===fields=== * '''When''': When the event occurred. ** If an event-type has a...") |
No edit summary |
||
Line 5: | Line 5: | ||
** If an event-type has a beginning and end, the auxiliary table for that type may treat '''When''' as "when started" and add a WhenComplete field to indicate when the event was complete. | ** If an event-type has a beginning and end, the auxiliary table for that type may treat '''When''' as "when started" and add a WhenComplete field to indicate when the event was complete. | ||
* '''Type''': short string indicating which type of event, i.e. which class to use (and which auxiliary event table to look at). | * '''Type''': short string indicating which type of event, i.e. which class to use (and which auxiliary event table to look at). | ||
** Types include: {{l/sub|vol}}, {{l/sub|fldr}}, {{l/sub|file}} | ** Types include: {{l/sub|vol}}, {{l/sub|entry}}, {{l/sub|fldr}}, {{l/sub|file}} | ||
* ''' | * '''What''': automatically-generated human-friendly description of what happened | ||
===history=== | ===history=== | ||
* '''2016-02-27''' started | * '''2016-02-27''' started | ||
==SQL== | ==SQL== | ||
<mysql>CREATE TABLE ` | <mysql>CREATE TABLE `event` ( | ||
`ID` INT NOT NULL AUTO_INCREMENT, | `ID` INT NOT NULL AUTO_INCREMENT, | ||
`When` DATETIME NOT NULL, | `When` DATETIME NOT NULL, | ||
`Type` | `Type` VARCHAR(15) DEFAULT NULL, | ||
` | `What` VARCHAR(255) DEFAULT NULL, | ||
PRIMARY KEY(`ID`) | PRIMARY KEY(`ID`) | ||
) | ) | ||
ENGINE = MYISAM;</mysql> | ENGINE = MYISAM;</mysql> |
Revision as of 22:54, 27 February 2016
About
- purpose: root events table -- all task-specific events tables refer to this one
fields
- When: When the event occurred.
- If an event-type has a beginning and end, the auxiliary table for that type may treat When as "when started" and add a WhenComplete field to indicate when the event was complete.
- Type: short string indicating which type of event, i.e. which class to use (and which auxiliary event table to look at).
- What: automatically-generated human-friendly description of what happened
history
- 2016-02-27 started
SQL
<mysql>CREATE TABLE `event` (
`ID` INT NOT NULL AUTO_INCREMENT, `When` DATETIME NOT NULL, `Type` VARCHAR(15) DEFAULT NULL, `What` VARCHAR(255) DEFAULT NULL, PRIMARY KEY(`ID`)
) ENGINE = MYISAM;</mysql>