User:Woozle/PostFerret/sql/text
< User:Woozle | PostFerret | sql
Jump to navigation
Jump to search
About
- Purpose: text records/revisions
- For now all revisions go in the same table; later, we should probably move old revisions into an archive so they don't slow down access to the ones currently in use.
- History:
- 2015-06-29 first draft
SQL
<mysql> CREATE TABLE `pf_text` (
`ID` INT NOT NULL AUTO_INCREMENT, `ID_Prev` INT NOT NULL COMMENT "ID of previous revision; if none, must equal self.ID", `Revision` INT NOT NULL COMMENT "revision number for this record; does not change; must be one higher than previous record's", `WhenSaved` DATETIME NOT NULL COMMENT "when this revision was created", `WhoSaved` INT DEFAULT NULL COMMENT "CMS-defined ID of who created this revision", `Content` TEXT NOT NULL COMMENT "the actual text" PRIMARY KEY(`ID`) )
ENGINE = MYISAM; </mysql>
Not Used
`ID_Atom` INT NOT NULL COMMENT "ID of atom to which this text belongs",