1 CREATE TABLE /*_*/site_stats_tmp (
2 -- The single row should contain 1 here.
3 ss_row_id
int unsigned
NOT NULL PRIMARY KEY,
5 -- Total number of edits performed.
6 ss_total_edits
bigint unsigned
default 0,
8 -- An approximate count of pages matching the following criteria:
11 -- * contains the text '[['
12 -- See Article::isCountable() in includes/Article.php
13 ss_good_articles
bigint unsigned
default 0,
15 -- Total pages, theoretically equal to SELECT COUNT(*) FROM page; except faster
16 ss_total_pages
bigint default '-1',
18 -- Number of users, theoretically equal to SELECT COUNT(*) FROM user;
19 ss_users
bigint default '-1',
21 -- Number of users that still edit
22 ss_active_users
bigint default '-1',
24 -- Number of images, equivalent to SELECT COUNT(*) FROM image
25 ss_images
int default 0
26 ) /*$wgDBTableOptions*/;
28 INSERT INTO /*_*/site_stats_tmp
29 SELECT * FROM /*_*/site_stats
;
31 DROP TABLE /*_*/site_stats
;
33 ALTER TABLE /*_*/site_stats_tmp
RENAME TO /*_*/site_stats
;