Difference between revisions of "User:Woozle/PostFerret/sql/atom"
< User:Woozle | PostFerret | sql
Jump to navigation
Jump to search
(leftover bugfix) |
(stuff) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==About== | ==About== | ||
− | * '''Purpose''': | + | * '''Purpose''': root record for all content types |
* '''Fields''': | * '''Fields''': | ||
+ | ** '''ID_Class''': ID of {{l/same|class}} record that is applicable to this Atom | ||
+ | *** This makes it possible to locate the appropriate code to display (or do other things with) an atom given only the atom's ID. | ||
* '''History''': | * '''History''': | ||
** '''2013-03-12''' Created, but not yet in use. | ** '''2013-03-12''' Created, but not yet in use. | ||
** '''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". | ||
+ | ** '''2015-06-29''' Stripped off timestamps, ownership, and revision #, since that stuff is now tracked in {{l/same|text}}. | ||
==SQL== | ==SQL== | ||
<mysql> | <mysql> | ||
− | CREATE TABLE ` | + | CREATE TABLE `pf_atom` ( |
− | `ID` INT | + | `ID` INT NOT NULL AUTO_INCREMENT, |
− | ` | + | `ID_Class` INT NOT NULL COMMENT "what type of chain is using this atom", |
− | + | PRIMARY KEY(`ID`) | |
− | |||
− | |||
− | |||
− | PRIMARY KEY(`ID`) | ||
) | ) | ||
ENGINE = MYISAM; | ENGINE = MYISAM; | ||
+ | </mysql> | ||
+ | ==Not Used== | ||
+ | I might later decide that some of these would be useful, but for now I'm taking out anything I can't immediately see a use for: | ||
+ | <mysql> | ||
+ | `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", | ||
</mysql> | </mysql> |
Latest revision as of 23:02, 29 June 2015
About
- Purpose: root record for all content types
- Fields:
- ID_Class: ID of class record that is applicable to this Atom
- This makes it possible to locate the appropriate code to display (or do other things with) an atom given only the atom's ID.
- ID_Class: ID of class record that is applicable to this Atom
- History:
- 2013-03-12 Created, but not yet in use.
- 2013-03-15 Most fields moved from post to atom.
- 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".
- 2015-06-29 Stripped off timestamps, ownership, and revision #, since that stuff is now tracked in text.
SQL
<mysql> CREATE TABLE `pf_atom` (
`ID` INT NOT NULL AUTO_INCREMENT, `ID_Class` INT NOT NULL COMMENT "what type of chain is using this atom", PRIMARY KEY(`ID`) ) ENGINE = MYISAM;
</mysql>
Not Used
I might later decide that some of these would be useful, but for now I'm taking out anything I can't immediately see a use for: <mysql>
`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",
</mysql>