diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-06-04 07:31:04 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-06-04 07:58:39 +0200 |
commit | f6d65e533c62f6deb21342d4901ece24497b433e (patch) | |
tree | f28adf0362d14bcd448f7b65a7aaf38650f923aa /maintenance/sqlite | |
parent | c27b2e832fe25651ef2410fae85b41072aae7519 (diff) |
Update to MediaWiki 1.25.1
Diffstat (limited to 'maintenance/sqlite')
5 files changed, 118 insertions, 4 deletions
diff --git a/maintenance/sqlite/archives/initial-indexes.sql b/maintenance/sqlite/archives/initial-indexes.sql index 954c85d3..f322a03c 100644 --- a/maintenance/sqlite/archives/initial-indexes.sql +++ b/maintenance/sqlite/archives/initial-indexes.sql @@ -69,7 +69,6 @@ CREATE TABLE /*_*/page_tmp ( page_namespace int NOT NULL, page_title varchar(255) binary NOT NULL, page_restrictions tinyblob NOT NULL, - page_counter bigint unsigned NOT NULL default 0, page_is_redirect tinyint unsigned NOT NULL default 0, page_is_new tinyint unsigned NOT NULL default 0, page_random real unsigned NOT NULL, @@ -164,7 +163,6 @@ CREATE INDEX /*i*/ll_lang_title ON /*_*/langlinks_tmp (ll_lang, ll_title); 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', diff --git a/maintenance/sqlite/archives/patch-drop-page_counter.sql b/maintenance/sqlite/archives/patch-drop-page_counter.sql new file mode 100644 index 00000000..ac8151da --- /dev/null +++ b/maintenance/sqlite/archives/patch-drop-page_counter.sql @@ -0,0 +1,31 @@ +-- field is deprecated and no longer updated as of 1.25 +CREATE TABLE /*_*/page_tmp ( + page_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, + page_namespace int NOT NULL, + page_title varchar(255) binary NOT NULL, + page_restrictions tinyblob NOT NULL, + page_is_redirect tinyint unsigned NOT NULL default 0, + page_is_new tinyint unsigned NOT NULL default 0, + page_random real unsigned NOT NULL, + page_touched binary(14) NOT NULL default '', + page_links_updated varbinary(14) NULL default NULL, + page_latest int unsigned NOT NULL, + page_len int unsigned NOT NULL, + page_content_model varbinary(32) DEFAULT NULL, + page_lang varbinary(35) DEFAULT NULL +) /*$wgDBTableOptions*/; + +INSERT INTO /*_*/page_tmp + SELECT page_id, page_namespace, page_title, page_restrictions, page_is_redirect, + page_is_new, page_random, page_touched, page_links_updated, page_latest, page_len, + page_content_model, page_lang + FROM /*_*/page; + +DROP TABLE /*_*/page; + +ALTER TABLE /*_*/page_tmp RENAME TO /*_*/page; + +CREATE UNIQUE INDEX /*i*/name_title ON /*_*/page (page_namespace,page_title); +CREATE INDEX /*i*/page_random ON /*_*/page (page_random); +CREATE INDEX /*i*/page_len ON /*_*/page (page_len); +CREATE INDEX /*i*/page_redirect_namespace_len ON /*_*/page (page_is_redirect, page_namespace, page_len); diff --git a/maintenance/sqlite/archives/patch-drop-ss_admins.sql b/maintenance/sqlite/archives/patch-drop-ss_admins.sql index 9951e17e..39606630 100644 --- a/maintenance/sqlite/archives/patch-drop-ss_admins.sql +++ b/maintenance/sqlite/archives/patch-drop-ss_admins.sql @@ -1,7 +1,6 @@ -- 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', @@ -11,7 +10,7 @@ CREATE TABLE /*_*/site_stats_tmp ( ) /*$wgDBTableOptions*/; INSERT INTO /*_*/site_stats_tmp - SELECT ss_row_id, ss_total_views, ss_total_edits, ss_good_articles, + SELECT ss_row_id, ss_total_edits, ss_good_articles, ss_total_pages, ss_users, ss_active_users, ss_images FROM /*_*/site_stats; diff --git a/maintenance/sqlite/archives/patch-drop-ss_total_views.sql b/maintenance/sqlite/archives/patch-drop-ss_total_views.sql new file mode 100644 index 00000000..ad80988d --- /dev/null +++ b/maintenance/sqlite/archives/patch-drop-ss_total_views.sql @@ -0,0 +1,21 @@ +-- 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); diff --git a/maintenance/sqlite/archives/patch-editsummary-length.sql b/maintenance/sqlite/archives/patch-editsummary-length.sql new file mode 100644 index 00000000..f86b2ada --- /dev/null +++ b/maintenance/sqlite/archives/patch-editsummary-length.sql @@ -0,0 +1,65 @@ +CREATE TABLE /*_*/filearchive_tmp ( + -- Unique row id + fa_id int NOT NULL PRIMARY KEY AUTO_INCREMENT, + + -- Original base filename; key to image.img_name, page.page_title, etc + fa_name varchar(255) binary NOT NULL default '', + + -- Filename of archived file, if an old revision + fa_archive_name varchar(255) binary default '', + + -- Which storage bin (directory tree or object store) the file data + -- is stored in. Should be 'deleted' for files that have been deleted; + -- any other bin is not yet in use. + fa_storage_group varbinary(16), + + -- SHA-1 of the file contents plus extension, used as a key for storage. + -- eg 8f8a562add37052a1848ff7771a2c515db94baa9.jpg + -- + -- If NULL, the file was missing at deletion time or has been purged + -- from the archival storage. + fa_storage_key varbinary(64) default '', + + -- Deletion information, if this file is deleted. + fa_deleted_user int, + fa_deleted_timestamp binary(14) default '', + fa_deleted_reason varbinary(767) default '', + -- Duped fields from image + fa_size int unsigned default 0, + fa_width int default 0, + fa_height int default 0, + fa_metadata mediumblob, + fa_bits int default 0, + fa_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, + fa_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart", "chemical") default "unknown", + fa_minor_mime varbinary(100) default "unknown", + fa_description varbinary(767), + fa_user int unsigned default 0, + fa_user_text varchar(255) binary, + fa_timestamp binary(14) default '', + + -- Visibility of deleted revisions, bitfield + fa_deleted tinyint unsigned NOT NULL default 0, + + -- sha1 hash of file content + fa_sha1 varbinary(32) NOT NULL default '' +) /*$wgDBTableOptions*/; + + +INSERT INTO /*_*/filearchive_tmp + SELECT fa_id, fa_name, fa_archive_name, fa_storage_group, fa_storage_key, fa_deleted_user, fa_deleted_timestamp, + fa_deleted_reason, fa_size, fa_width, fa_height, fa_metadata, fa_bits, fa_media_type, fa_major_mime, + fa_minor_mime, fa_description, fa_user, fa_user_text, fa_timestamp, fa_deleted, fa_sha1 + FROM /*_*/filearchive; + +DROP TABLE /*_*/filearchive; + +ALTER TABLE /*_*/filearchive_tmp RENAME TO /*_*/filearchive; + + +CREATE INDEX /*i*/fa_name ON /*_*/filearchive (fa_name, fa_timestamp); +CREATE INDEX /*i*/fa_storage_group ON /*_*/filearchive (fa_storage_group, fa_storage_key); +CREATE INDEX /*i*/fa_deleted_timestamp ON /*_*/filearchive (fa_deleted_timestamp); +CREATE INDEX /*i*/fa_user_timestamp ON /*_*/filearchive (fa_user_text,fa_timestamp); +CREATE INDEX /*i*/fa_sha1 ON /*_*/filearchive (fa_sha1(10)); + |