MWX/SpamFerret/tables/pattern log: Difference between revisions
< MWX | SpamFerret | tables
Jump to navigation
Jump to search
(rules; changed "code" to "isWrite") |
m (Woozle moved page SpamFerret/tables/pattern log to MWX/SpamFerret/tables/pattern log without leaving a redirect: most mediawiki extensions belong under MWX now) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
** '''adding a new pattern''': | ** '''adding a new pattern''': | ||
**# if new pattern not in archive, add an entry for it | **# if new pattern not in archive, add an entry for it | ||
**# log event | **# log event: ID_Old=NULL, ID_New= new pattern | ||
**# add the pattern record to {{spamferret|table|patterns}} | **# add the pattern record to {{spamferret|table|patterns}} | ||
** '''modifying a pattern''': | ** '''modifying a pattern''': | ||
**# if old pattern not in archive, add an entry for it | **# if old pattern not in archive, add an entry for it | ||
**# if new pattern not in archive, add an entry for it | **# if new pattern not in archive, add an entry for it | ||
**# log event | **# log event: ID_Old= old pattern, ID_New= new pattern | ||
**# modify the record in {{spamferret|table|patterns}} | **# modify the record in {{spamferret|table|patterns}} and increment count in archive | ||
** '''retiring a pattern''': | ** '''retiring a pattern''': | ||
**# if old pattern not in archive, add an entry for it | **# if old pattern not in archive, add an entry for it | ||
**# log event | **# log event: ID_Old= old pattern, ID_New = NULL | ||
**# | **# delete the record in {{spamferret|table|patterns}} and increment count in archive | ||
* '''History''': | * '''History''': | ||
** '''2009-08-05''' Created for Special:SpamFerret | ** '''2009-08-05''' Created for Special:SpamFerret | ||
==SQL== | ==SQL== | ||
<mysql>CREATE TABLE `pattern_log` ( | <mysql>CREATE TABLE `pattern_log` ( | ||
`ID` | `ID` INT NOT NULL AUTO_INCREMENT, | ||
`ID_Pattern` INT | `ID_Pattern` INT NOT NULL COMMENT "patterns.ID of pattern being altered", | ||
` | `ID_Old` INT DEFAULT NULL COMMENT "pattern_archive.ID of old value of pattern being edited", | ||
` | `ID_New` INT DEFAULT NULL COMMENT "pattern_archive.ID of new value of pattern being edited", | ||
`UserName` VARCHAR(255) NOT NULL COMMENT "username of administrator who made this pattern change", | |||
`UserSite` VARCHAR(63) DEFAULT NULL COMMENT "identifier of site from which pattern is being changed (optional)", | |||
`Notes` VARCHAR(255) DEFAULT NULL COMMENT "human-entered notes explaining reason for change (optional)", | |||
PRIMARY KEY(`ID`) | |||
)ENGINE = MYISAM;</mysql> | )ENGINE = MYISAM;</mysql> |
Latest revision as of 20:14, 1 May 2022
About
- Rules:
- adding a new pattern:
- if new pattern not in archive, add an entry for it
- log event: ID_Old=NULL, ID_New= new pattern
- add the pattern record to Template:Spamferret
- modifying a pattern:
- if old pattern not in archive, add an entry for it
- if new pattern not in archive, add an entry for it
- log event: ID_Old= old pattern, ID_New= new pattern
- modify the record in Template:Spamferret and increment count in archive
- retiring a pattern:
- if old pattern not in archive, add an entry for it
- log event: ID_Old= old pattern, ID_New = NULL
- delete the record in Template:Spamferret and increment count in archive
- adding a new pattern:
- 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_Old` INT DEFAULT NULL COMMENT "pattern_archive.ID of old value of pattern being edited", `ID_New` INT DEFAULT NULL COMMENT "pattern_archive.ID of new value of pattern being edited", `UserName` VARCHAR(255) NOT NULL COMMENT "username of administrator who made this pattern change", `UserSite` VARCHAR(63) DEFAULT NULL COMMENT "identifier of site from which pattern is being changed (optional)", `Notes` VARCHAR(255) DEFAULT NULL COMMENT "human-entered notes explaining reason for change (optional)", PRIMARY KEY(`ID`)
)ENGINE = MYISAM;</mysql>