(bug 32552) Drop unused database field cat_hidden

For the hiddencat feature the page prop table is used

Change-Id: If01d3394617ab8aec1a9b50c20bfe923df08732c
This commit is contained in:
umherirrender 2012-08-03 21:33:18 +02:00
parent 8cfaf798f6
commit 0cbc85494d
6 changed files with 27 additions and 4 deletions

View file

@ -237,6 +237,7 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki.
* (bug 36761) "Mark pages as visited" now submits previously established filter options.
* (bug 39635) PostgreSQL LOCK IN SHARE MODE option is a syntax error.
* (bug 36329) Accesskey tooltips for Firefox 14 on Mac should use "ctrl-option-" prefix.
* (bug 32552) Drop unused database field cat_hidden from table category.
=== API changes in 1.20 ===
* (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API.

View file

@ -213,6 +213,7 @@ class MysqlUpdater extends DatabaseUpdater {
array( 'addIndex', 'revision', 'page_user_timestamp', 'patch-revision-user-page-index.sql' ),
array( 'addField', 'ipblocks', 'ipb_parent_block_id', 'patch-ipb-parent-block-id.sql' ),
array( 'addIndex', 'ipblocks', 'ipb_parent_block_id', 'patch-ipb-parent-block-id-index.sql' ),
array( 'dropField', 'category', 'cat_hidden', 'patch-cat_hidden.sql' ),
);
}

View file

@ -92,6 +92,7 @@ class SqliteUpdater extends DatabaseUpdater {
array( 'addIndex', 'revision', 'page_user_timestamp', 'patch-revision-user-page-index.sql' ),
array( 'addField', 'ipblocks', 'ipb_parent_block_id', 'patch-ipb-parent-block-id.sql' ),
array( 'addIndex', 'ipblocks', 'ipb_parent_block_id', 'patch-ipb-parent-block-id-index.sql' ),
array( 'dropField', 'category', 'cat_hidden', 'patch-cat_hidden.sql' ),
);
}

View file

@ -0,0 +1,3 @@
-- cat_hidden is no longer used, delete it
ALTER TABLE /*$wgDBprefix*/category DROP COLUMN cat_hidden;

View file

@ -0,0 +1,20 @@
-- cat_hidden is no longer used, delete it
CREATE TABLE /*_*/category_tmp (
cat_id int unsigned NOT NULL PRIMARY KEY 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
) /*$wgDBTableOptions*/;
INSERT INTO /*_*/category_tmp
SELECT cat_id, cat_title, cat_pages, cat_subcats, cat_files
FROM /*_*/category;
DROP TABLE /*_*/category;
ALTER TABLE /*_*/category_tmp RENAME TO /*_*/category;
CREATE UNIQUE INDEX /*i*/cat_title ON /*_*/category (cat_title);
CREATE INDEX /*i*/cat_pages ON /*_*/category (cat_pages);

View file

@ -571,10 +571,7 @@ CREATE TABLE /*_*/category (
-- ing is not.
cat_pages int signed NOT NULL default 0,
cat_subcats int signed NOT NULL default 0,
cat_files int signed NOT NULL default 0,
-- Reserved for future use
cat_hidden tinyint unsigned NOT NULL default 0
cat_files int signed NOT NULL default 0
) /*$wgDBTableOptions*/;
CREATE UNIQUE INDEX /*i*/cat_title ON /*_*/category (cat_title);