wiki.techinc.nl/maintenance/sqlite/archives/patch-cat_hidden.sql
umherirrender 0cbc85494d (bug 32552) Drop unused database field cat_hidden
For the hiddencat feature the page prop table is used

Change-Id: If01d3394617ab8aec1a9b50c20bfe923df08732c
2012-09-06 18:47:39 +02:00

20 lines
654 B
SQL

-- 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);