MWX/SpamFerret/tables/patterns: Difference between revisions

From Woozle Writes Code
< MWX‎ | SpamFerret‎ | tables
Jump to navigation Jump to search
(Created page with '==About== * '''History''': ** '''2009-07-14''' Adding attempts.diff and patterns.isDiff to enable more advanced filtering (e.g. bots which delete most of a section and replace it…')
 
(+ID_Archive)
Line 2: Line 2:
* '''History''':
* '''History''':
** '''2009-07-14''' Adding attempts.diff and patterns.isDiff to enable more advanced filtering (e.g. bots which delete most of a section and replace it with a nonsense word)
** '''2009-07-14''' Adding attempts.diff and patterns.isDiff to enable more advanced filtering (e.g. bots which delete most of a section and replace it with a nonsense word)
** '''2009-08-05''' Adding ID_Archive field (part of new pattern maintenance system)
==SQL==
==SQL==
<mysql>CREATE TABLE `patterns` (
<mysql>CREATE TABLE `patterns` (
   `ID` INT NOT NULL AUTO_INCREMENT,
   `ID` INT NOT NULL AUTO_INCREMENT,
   `Pattern` varchar(255) COMMENT "pattern to match (regex or straight text match)",
   `Pattern` varchar(255) COMMENT "pattern to match (regex or straight text match)",
  `ID_Archive` INT NOT NULL COMMENT "pattern_archive.ID of source for this pattern",
   `WhenAdded` DATETIME DEFAULT NULL COMMENT "when this entry was added",
   `WhenAdded` DATETIME DEFAULT NULL COMMENT "when this entry was added",
   `WhenTried` DATETIME DEFAULT NULL COMMENT "when a spammer last attempted to include this pattern",
   `WhenTried` DATETIME DEFAULT NULL COMMENT "when a spammer last attempted to include this pattern",

Revision as of 22:10, 5 August 2009

About

  • History:
    • 2009-07-14 Adding attempts.diff and patterns.isDiff to enable more advanced filtering (e.g. bots which delete most of a section and replace it with a nonsense word)
    • 2009-08-05 Adding ID_Archive field (part of new pattern maintenance system)

SQL

<mysql>CREATE TABLE `patterns` (

 `ID` INT NOT NULL AUTO_INCREMENT,
 `Pattern` varchar(255) COMMENT "pattern to match (regex or straight text match)",
 `ID_Archive` INT NOT NULL COMMENT "pattern_archive.ID of source for this pattern",
 `WhenAdded` DATETIME DEFAULT NULL COMMENT "when this entry was added",
 `WhenTried` DATETIME DEFAULT NULL COMMENT "when a spammer last attempted to include this pattern",
 `isActive`  TINYINT(1) COMMENT "FALSE = do not include in checking",
 `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",
 `Count` INT DEFAULT 0 COMMENT "number of attempts",
 PRIMARY KEY(`ID`)

) ENGINE = MYISAM;</mysql>