summaryrefslogtreecommitdiff
path: root/maintenance/sqlite
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /maintenance/sqlite
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'maintenance/sqlite')
-rw-r--r--maintenance/sqlite/archives/initial-indexes.sql5
-rw-r--r--maintenance/sqlite/archives/patch-drop-user_options.sql31
-rw-r--r--maintenance/sqlite/archives/patch-jobs-add-timestamp.sql2
-rw-r--r--maintenance/sqlite/archives/patch-page_redirect_namespace_len.sql7
-rw-r--r--maintenance/sqlite/archives/patch-ufg_group-length-increase.sql15
-rw-r--r--maintenance/sqlite/archives/patch-ug_group-length-increase.sql15
6 files changed, 72 insertions, 3 deletions
diff --git a/maintenance/sqlite/archives/initial-indexes.sql b/maintenance/sqlite/archives/initial-indexes.sql
index 2573ca13..73b008cc 100644
--- a/maintenance/sqlite/archives/initial-indexes.sql
+++ b/maintenance/sqlite/archives/initial-indexes.sql
@@ -3,7 +3,7 @@
-- Unique indexes need to be handled with INSERT SELECT since just running
-- the CREATE INDEX statement will fail if there are duplicate values.
--
--- Ignore duplicates, several tables will have them (e.g. bug 16966) but in
+-- Ignore duplicates, several tables will have them (e.g. bug 16966) but in
-- most cases it's harmless to discard them.
--------------------------------------------------------------------------------
@@ -218,7 +218,7 @@ CREATE TABLE /*_*/math_tmp (
math_outputhash varbinary(16) NOT NULL,
math_html_conservativeness tinyint NOT NULL,
math_html text,
- math_mathml text
+ math_mathml text
);
CREATE UNIQUE INDEX /*i*/math_inputhash ON /*_*/math_tmp (math_inputhash);
@@ -406,7 +406,6 @@ CREATE INDEX /*i*/type_time ON /*_*/logging (log_type, log_timestamp);
CREATE INDEX /*i*/user_time ON /*_*/logging (log_user, log_timestamp);
CREATE INDEX /*i*/page_time ON /*_*/logging (log_namespace, log_title, log_timestamp);
CREATE INDEX /*i*/times ON /*_*/logging (log_timestamp);
-CREATE INDEX /*i*/tb_page ON /*_*/trackbacks (tb_page);
CREATE INDEX /*i*/job_cmd_namespace_title ON /*_*/job (job_cmd, job_namespace, job_title);
CREATE INDEX /*i*/rd_ns_title ON /*_*/redirect (rd_namespace,rd_title,rd_from);
CREATE INDEX /*i*/qcc_type ON /*_*/querycachetwo (qcc_type,qcc_value);
diff --git a/maintenance/sqlite/archives/patch-drop-user_options.sql b/maintenance/sqlite/archives/patch-drop-user_options.sql
new file mode 100644
index 00000000..5bc6a47c
--- /dev/null
+++ b/maintenance/sqlite/archives/patch-drop-user_options.sql
@@ -0,0 +1,31 @@
+-- Remove user_options field from user table
+
+CREATE TABLE /*_*/user_tmp (
+ user_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ user_name varchar(255) binary NOT NULL default '',
+ user_real_name varchar(255) binary NOT NULL default '',
+ user_password tinyblob NOT NULL,
+ user_newpassword tinyblob NOT NULL,
+ user_newpass_time binary(14),
+ user_email tinytext NOT NULL,
+ user_touched binary(14) NOT NULL default '',
+ user_token binary(32) NOT NULL default '',
+ user_email_authenticated binary(14),
+ user_email_token binary(32),
+ user_email_token_expires binary(14),
+ user_registration binary(14),
+ user_editcount int
+) /*$wgDBTableOptions*/;
+
+INSERT INTO /*_*/user_tmp
+ SELECT user_id, user_name, user_real_name, user_password, user_newpassword, user_newpass_time, user_email, user_touched,
+ user_token, user_email_authenticated, user_email_token, user_email_token_expires, user_registration, user_editcount
+ FROM /*_*/user;
+
+DROP TABLE /*_*/user;
+
+ALTER TABLE /*_*/user_tmp RENAME TO /*_*/user;
+
+CREATE UNIQUE INDEX /*i*/user_name ON /*_*/user (user_name);
+CREATE INDEX /*i*/user_email_token ON /*_*/user (user_email_token);
+CREATE INDEX /*i*/user_email ON /*_*/user (user_email(50));
diff --git a/maintenance/sqlite/archives/patch-jobs-add-timestamp.sql b/maintenance/sqlite/archives/patch-jobs-add-timestamp.sql
new file mode 100644
index 00000000..c5e6e711
--- /dev/null
+++ b/maintenance/sqlite/archives/patch-jobs-add-timestamp.sql
@@ -0,0 +1,2 @@
+ALTER TABLE /*_*/job ADD COLUMN job_timestamp varbinary(14) NULL default NULL;
+CREATE INDEX /*i*/job_timestamp ON /*_*/job(job_timestamp);
diff --git a/maintenance/sqlite/archives/patch-page_redirect_namespace_len.sql b/maintenance/sqlite/archives/patch-page_redirect_namespace_len.sql
new file mode 100644
index 00000000..d9eedadd
--- /dev/null
+++ b/maintenance/sqlite/archives/patch-page_redirect_namespace_len.sql
@@ -0,0 +1,7 @@
+--
+-- Add the page_redirect_namespace_len index
+--
+
+CREATE INDEX /*i*/page_redirect_namespace_len ON /*_*/page (page_is_redirect, page_namespace, page_len);
+
+
diff --git a/maintenance/sqlite/archives/patch-ufg_group-length-increase.sql b/maintenance/sqlite/archives/patch-ufg_group-length-increase.sql
new file mode 100644
index 00000000..c6dcea5e
--- /dev/null
+++ b/maintenance/sqlite/archives/patch-ufg_group-length-increase.sql
@@ -0,0 +1,15 @@
+CREATE TABLE /*_*/user_former_groups_tmp (
+ ug_user int unsigned NOT NULL default 0,
+ ug_group varbinary(32) NOT NULL default ''
+) /*$wgDBTableOptions*/;
+
+INSERT INTO /*_*/user_former_groups_tmp
+ SELECT ug_user, ug_group
+ FROM /*_*/user_groups;
+
+DROP TABLE /*_*/user_former_groups;
+
+ALTER TABLE /*_*/user_former_groups_tmp RENAME TO /*_*/user_former_groups;
+
+CREATE UNIQUE INDEX /*i*/ufg_user_group ON /*_*/user_former_groups (ufg_user,ufg_group);
+
diff --git a/maintenance/sqlite/archives/patch-ug_group-length-increase.sql b/maintenance/sqlite/archives/patch-ug_group-length-increase.sql
new file mode 100644
index 00000000..5e810937
--- /dev/null
+++ b/maintenance/sqlite/archives/patch-ug_group-length-increase.sql
@@ -0,0 +1,15 @@
+CREATE TABLE /*_*/user_groups_tmp (
+ ug_user int unsigned NOT NULL default 0,
+ ug_group varbinary(32) NOT NULL default ''
+) /*$wgDBTableOptions*/;
+
+INSERT INTO /*_*/user_groups_tmp
+ SELECT ug_user, ug_group
+ FROM /*_*/user_groups;
+
+DROP TABLE /*_*/user_groups;
+
+ALTER TABLE /*_*/user_groups_tmp RENAME TO /*_*/user_groups;
+
+CREATE UNIQUE INDEX /*i*/ug_user_group ON /*_*/user_groups (ug_user,ug_group);
+CREATE INDEX /*i*/ug_group ON /*_*/user_groups (ug_group);