MWX/SpamFerret/tables/pattern archive: Difference between revisions
< MWX | SpamFerret | tables
Jump to navigation
Jump to search
("ID_Pattern" is unnecessary; removing it. Added field for human-entered notes.) |
(rework) |
||
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())", | ||
`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> |
Revision as of 01:45, 4 February 2011
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>