* Adds Category and CategoryList classes to represent categories themselves. * Adds a category table, giving each category a name, ID, and counts of all members, subcats only, and files. * Adds a maintenance script to populate the category table efficiently. This script is careful to wait for slaves and should be safe to run on a live database. The maintenance script's includes file is called by update.php. * Until the category table is populated, the patch handles weird category table rows gracefully. It detects whether they're obviously impossible, and if so, it outputs appropriate messages.
17 lines
413 B
SQL
17 lines
413 B
SQL
CREATE TABLE /*$wgDBprefix*/category (
|
|
cat_id int unsigned NOT NULL auto_increment,
|
|
|
|
cat_title varchar(255) binary NOT NULL,
|
|
|
|
cat_pages int signed NOT NULL default 0,
|
|
cat_subcats int signed NOT NULL default 0,
|
|
cat_files int signed NOT NULL default 0,
|
|
|
|
cat_hidden tinyint(1) unsigned NOT NULL default 0,
|
|
|
|
PRIMARY KEY (cat_id),
|
|
UNIQUE KEY (cat_title),
|
|
|
|
KEY (cat_pages)
|
|
) /*$wgDBTableOptions*/;
|
|
|