wiki.techinc.nl/maintenance/sqlite/archives/patch-drop-ss_total_views.sql
Chad Horohoe 5f8edb2c0a Drop ss_total_views and page_counter fields from MediaWiki
Follows up removal of code using hitcounters in 90d90dad6

RFC: https://www.mediawiki.org/wiki/Requests_for_comment/Removing_hit_counters_from_MediaWiki_core
Change-Id: Ieeb558f9523c11965cbc1941cad4f316c00c85c5
2015-01-09 19:01:01 +00:00

21 lines
701 B
SQL

-- field is deprecated and no longer updated as of 1.25
CREATE TABLE /*_*/site_stats_tmp (
ss_row_id int unsigned NOT NULL,
ss_total_edits bigint unsigned default 0,
ss_good_articles bigint unsigned default 0,
ss_total_pages bigint default '-1',
ss_users bigint default '-1',
ss_active_users bigint default '-1',
ss_images int default 0
) /*$wgDBTableOptions*/;
INSERT INTO /*_*/site_stats_tmp
SELECT ss_row_id, ss_total_edits, ss_good_articles, ss_total_pages,
ss_users, ss_active_users, ss_images
FROM /*_*/site_stats;
DROP TABLE /*_*/site_stats;
ALTER TABLE /*_*/site_stats_tmp RENAME TO /*_*/site_stats;
CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id);