Drop unused database field ss_admins

no longer updated since 1.5

Change-Id: Iebdce084d178b5003105b2d2b7dcc499c274ff56
This commit is contained in:
umherirrender 2012-09-23 01:05:07 +02:00
parent 9f80653291
commit bd602d2083
5 changed files with 26 additions and 3 deletions

View file

@ -216,6 +216,7 @@ class MysqlUpdater extends DatabaseUpdater {
array( 'dropField', 'category', 'cat_hidden', 'patch-cat_hidden.sql' ),
// 1.21
array( 'dropField', 'site_stats', 'ss_admins', 'patch-drop-ss_admins.sql' ),
);
}

View file

@ -95,6 +95,7 @@ class SqliteUpdater extends DatabaseUpdater {
array( 'dropField', 'category', 'cat_hidden', 'patch-cat_hidden.sql' ),
// 1.21
array( 'dropField', 'site_stats', 'ss_admins', 'patch-drop-ss_admins.sql' ),
);
}

View file

@ -0,0 +1,2 @@
-- field is deprecated and no longer updated as of 1.5
ALTER TABLE /*_*/site_stats DROP COLUMN ss_admins;

View file

@ -0,0 +1,22 @@
-- field is deprecated and no longer updated as of 1.5
CREATE TABLE /*_*/site_stats_tmp (
ss_row_id int unsigned NOT NULL,
ss_total_views bigint unsigned default 0,
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_views, 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);

View file

@ -689,9 +689,6 @@ CREATE TABLE /*_*/site_stats (
-- Number of users that still edit
ss_active_users bigint default '-1',
-- Deprecated, no longer updated as of 1.5
ss_admins int default '-1',
-- Number of images, equivalent to SELECT COUNT(*) FROM image
ss_images int default 0
) /*$wgDBTableOptions*/;