mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Linter
synced 2024-11-13 17:57:15 +00:00
b41e74ce8b
Instead of having a complex auto-increment category manager that had additional caching, just hardcode the (currently 6) ids for each category, which allows us to simplify a lot of code. If Parsoid sends a lint error in a category that we don't know about, it is silently dropped. Bug: T151287 Change-Id: Ice6edf1b7985390aa0c1c410d357bc565bb69108
16 lines
504 B
SQL
16 lines
504 B
SQL
CREATE TABLE /*_*/linter (
|
|
-- primary key
|
|
linter_id int UNSIGNED PRIMARY KEY not null AUTO_INCREMENT,
|
|
-- page id
|
|
linter_page int UNSIGNED not null,
|
|
-- error category (see CategoryManager::$categoryIds)
|
|
linter_cat int UNSIGNED not null,
|
|
-- extra parameters about the error, JSON encoded
|
|
linter_params blob NOT NULL
|
|
) /*$wgDBTableOptions*/;
|
|
|
|
-- Query by page
|
|
CREATE INDEX /*i*/linter_page ON /*_*/linter (linter_page);
|
|
-- Query by category
|
|
CREATE INDEX /*i*/linter_cat ON /*_*/linter (linter_cat);
|