Difference between revisions of "User:Woozle/PostFerret/sql/atom"
< User:Woozle | PostFerret | sql
Jump to navigation
Jump to search
m (syntax fix) |
(Class field and comment tweaks) |
||
Line 6: | Line 6: | ||
** '''2013-03-15''' Most fields moved from {{l/same|post}} to {{l/same|atom}}. | ** '''2013-03-15''' Most fields moved from {{l/same|post}} to {{l/same|atom}}. | ||
** '''2013-06-28''' "Summary" can't be a key if it's no longer a field. | ** '''2013-06-28''' "Summary" can't be a key if it's no longer a field. | ||
+ | ** '''2013-07-19''' Added "Class" field; corrected field descriptions referring to "question" | ||
+ | *** Maybe "QtyEdits" should be renamed "Version". | ||
==SQL== | ==SQL== | ||
<mysql> | <mysql> | ||
CREATE TABLE `atom` ( | CREATE TABLE `atom` ( | ||
`ID` INT NOT NULL AUTO_INCREMENT, | `ID` INT NOT NULL AUTO_INCREMENT, | ||
− | `WhenCreated` DATETIME NOT NULL COMMENT "when this | + | `Class` VARCHAR(15) NOT NULL COMMENT "what type of chain is using this atom", |
− | `WhoCreated` INT NOT NULL COMMENT "ID (site-defined) of user who | + | `WhenCreated` DATETIME NOT NULL COMMENT "when the record-chain attached to this atom was created", |
− | `WhenEdited` DATETIME DEFAULT NULL COMMENT "when | + | `WhoCreated` INT NOT NULL COMMENT "ID (site-defined) of user who created it", |
− | `WhoEdited` INT DEFAULT NULL COMMENT "ID of user who last edited | + | `WhenEdited` DATETIME DEFAULT NULL COMMENT "when it was last edited", |
− | `QtyEdits` INT DEFAULT NULL COMMENT "number of times | + | `WhoEdited` INT DEFAULT NULL COMMENT "ID of user who last edited it", |
+ | `QtyEdits` INT DEFAULT NULL COMMENT "number of times it has been edited (i.e. version number)", | ||
PRIMARY KEY(`ID`) | PRIMARY KEY(`ID`) | ||
) | ) | ||
ENGINE = MYISAM; | ENGINE = MYISAM; | ||
</mysql> | </mysql> |
Revision as of 18:48, 19 July 2013
About
- Purpose:
- Fields:
- History:
SQL
<mysql> CREATE TABLE `atom` (
`ID` INT NOT NULL AUTO_INCREMENT, `Class` VARCHAR(15) NOT NULL COMMENT "what type of chain is using this atom", `WhenCreated` DATETIME NOT NULL COMMENT "when the record-chain attached to this atom was created", `WhoCreated` INT NOT NULL COMMENT "ID (site-defined) of user who created it", `WhenEdited` DATETIME DEFAULT NULL COMMENT "when it was last edited", `WhoEdited` INT DEFAULT NULL COMMENT "ID of user who last edited it", `QtyEdits` INT DEFAULT NULL COMMENT "number of times it has been edited (i.e. version number)", PRIMARY KEY(`ID`) ) ENGINE = MYISAM;
</mysql>