MWX/SpamFerret/tables/pattern archive: Difference between revisions

From Woozle Writes Code
< MWX‎ | SpamFerret‎ | tables
Jump to navigation Jump to search
("ID_Pattern" is unnecessary; removing it. Added field for human-entered notes.)
m (Woozle moved page SpamFerret/tables/pattern archive to MWX/SpamFerret/tables/pattern archive without leaving a redirect: most mediawiki extensions belong under MWX now)
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
* '''History''':
* '''History''':
** '''2009-08-05''' Created for Special:SpamFerret
** '''2009-08-05''' Created for Special:SpamFerret
** '''2011-02-03''' Substantial rework -- needed a field to store the text, for one thing. Decided not to collect any stats here, for another.
==SQL==
==SQL==
<mysql>CREATE TABLE `pattern_archive` (
<mysql>CREATE TABLE `pattern_archive` (
   `ID` INT NOT NULL AUTO_INCREMENT,
   `ID` INT NOT NULL AUTO_INCREMENT,
   `isURL`    TINYINT(1) COMMENT "TRUE indicates that additional URL-related stats may be collected",
  `Pattern`  VARCHAR(255)    NOT NULL  COMMENT "pattern to match (regex or straight text match)",
   `isRegex`  TINYINT(1) COMMENT "TRUE = regex (use preg_match()); FALSE = normal string comparison (use stristr())",
   `isURL`    TINYINT(1)                 COMMENT "TRUE indicates that additional URL-related stats may be collected",
   `isDiff`    TINYINT(1) DEFAULT FALSE COMMENT "TRUE = pattern should be compared to the diff, not the edit contents",
   `isRegex`  TINYINT(1)                 COMMENT "TRUE = regex (use preg_match()); FALSE = normal string comparison (use stristr())",
  `Count` INT DEFAULT 0 COMMENT "number of attempts",
   `isDiff`    TINYINT(1)   DEFAULT FALSE COMMENT "TRUE = pattern should be compared to the diff, not the edit contents",
   `Notes` VARCHAR(255) COMMENT "human-entered notes",
   `Notes`     VARCHAR(255) DEFAULT NULL  COMMENT "human-entered notes",
   PRIMARY KEY(`ID`)
   PRIMARY KEY(`ID`)
)
)
ENGINE = MYISAM;</mysql>
ENGINE = MYISAM;</mysql>

Latest revision as of 20:14, 1 May 2022

About

  • History:
    • 2009-08-05 Created for Special:SpamFerret
    • 2011-02-03 Substantial rework -- needed a field to store the text, for one thing. Decided not to collect any stats here, for another.

SQL

<mysql>CREATE TABLE `pattern_archive` (

 `ID` INT NOT NULL AUTO_INCREMENT,
 `Pattern`   VARCHAR(255)     NOT NULL  COMMENT "pattern to match (regex or straight text match)",
 `isURL`     TINYINT(1)                 COMMENT "TRUE indicates that additional URL-related stats may be collected",
 `isRegex`   TINYINT(1)                 COMMENT "TRUE = regex (use preg_match()); FALSE = normal string comparison (use stristr())",
 `isDiff`    TINYINT(1)   DEFAULT FALSE COMMENT "TRUE = pattern should be compared to the diff, not the edit contents",
 `Notes`     VARCHAR(255) DEFAULT NULL  COMMENT "human-entered notes",
 PRIMARY KEY(`ID`)

) ENGINE = MYISAM;</mysql>