MWX/SpamFerret/tables/pattern log

From Woozle Writes Code
< MWX‎ | SpamFerret‎ | tables
Revision as of 19:22, 5 August 2009 by Woozle (talk | contribs) (rules; changed "code" to "isWrite")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

  • Rules:
    • adding a new pattern:
      1. if new pattern not in archive, add an entry for it
      2. log event with isWrite=TRUE and ID_Archive pointing to new pattern
      3. add the pattern record to Template:Spamferret
    • modifying a pattern:
      1. if old pattern not in archive, add an entry for it
      2. log event with isWrite=FALSE and ID_Archive pointing to old pattern
      3. if new pattern not in archive, add an entry for it
      4. log event with isWrite=TRUE and ID_Archive pointing to new pattern
      5. modify the record in Template:Spamferret
    • retiring a pattern:
      1. if old pattern not in archive, add an entry for it
      2. log event with isWrite=FALSE and ID_Archive pointing to old pattern
      3. log event with isWrite=TRUE and ID_Archive = NULL
  • History:
    • 2009-08-05 Created for Special:SpamFerret

SQL

<mysql>CREATE TABLE `pattern_log` (

 `ID`         INT     NOT NULL AUTO_INCREMENT,
 `ID_Pattern` INT     NOT NULL COMMENT "patterns.ID of pattern being altered",
 `ID_Archive` INT DEFAULT NULL COMMENT "pattern_archive.ID of archived pattern being accessed",
 `isWrite` TINYINT(1) NOT NULL COMMENT "type of event"

)ENGINE = MYISAM;</mysql>