summaryrefslogtreecommitdiff
path: root/maintenance/archives
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/archives')
-rw-r--r--maintenance/archives/patch-archive-ar_id.sql8
-rw-r--r--maintenance/archives/patch-change_tag.sql17
-rw-r--r--maintenance/archives/patch-eu_local_id.sql3
-rw-r--r--maintenance/archives/patch-external_user.sql9
-rw-r--r--maintenance/archives/patch-externallinks-el_id.sql8
-rw-r--r--maintenance/archives/patch-iwl_prefix_title_from-non-unique.sql5
-rw-r--r--maintenance/archives/patch-iwlinks-from-title-index.sql4
-rw-r--r--maintenance/archives/patch-kill-iwl_pft.sql7
-rw-r--r--maintenance/archives/patch-tag_summary.sql12
-rw-r--r--maintenance/archives/patch-valid_tag.sql4
-rw-r--r--maintenance/archives/upgradeLogging.php2
11 files changed, 42 insertions, 37 deletions
diff --git a/maintenance/archives/patch-archive-ar_id.sql b/maintenance/archives/patch-archive-ar_id.sql
new file mode 100644
index 00000000..ddd1d7b4
--- /dev/null
+++ b/maintenance/archives/patch-archive-ar_id.sql
@@ -0,0 +1,8 @@
+--
+-- patch-archive-ar_id.sql
+--
+-- Bug 39675. Add archive.ar_id.
+
+ALTER TABLE /*$wgDBprefix*/archive
+ ADD COLUMN ar_id int unsigned NOT NULL AUTO_INCREMENT FIRST,
+ ADD PRIMARY KEY (ar_id);
diff --git a/maintenance/archives/patch-change_tag.sql b/maintenance/archives/patch-change_tag.sql
index 030e086b..3079a5bb 100644
--- a/maintenance/archives/patch-change_tag.sql
+++ b/maintenance/archives/patch-change_tag.sql
@@ -13,20 +13,3 @@ CREATE UNIQUE INDEX /*i*/change_tag_log_tag ON /*_*/change_tag (ct_log_id,ct_tag
CREATE UNIQUE INDEX /*i*/change_tag_rev_tag ON /*_*/change_tag (ct_rev_id,ct_tag);
-- Covering index, so we can pull all the info only out of the index.
CREATE INDEX /*i*/change_tag_tag_id ON /*_*/change_tag (ct_tag,ct_rc_id,ct_rev_id,ct_log_id);
-
--- Rollup table to pull a LIST of tags simply without ugly GROUP_CONCAT that only works on MySQL 4.1+
-CREATE TABLE /*_*/tag_summary (
- ts_rc_id int NULL,
- ts_log_id int NULL,
- ts_rev_id int NULL,
- ts_tags BLOB NOT NULL
-) /*$wgDBTableOptions*/;
-
-CREATE UNIQUE INDEX /*i*/tag_summary_rc_id ON /*_*/tag_summary (ts_rc_id);
-CREATE UNIQUE INDEX /*i*/tag_summary_log_id ON /*_*/tag_summary (ts_log_id);
-CREATE UNIQUE INDEX /*i*/tag_summary_rev_id ON /*_*/tag_summary (ts_rev_id);
-
-
-CREATE TABLE /*_*/valid_tag (
- vt_tag varchar(255) NOT NULL PRIMARY KEY
-) /*$wgDBTableOptions*/;
diff --git a/maintenance/archives/patch-eu_local_id.sql b/maintenance/archives/patch-eu_local_id.sql
deleted file mode 100644
index bb59d067..00000000
--- a/maintenance/archives/patch-eu_local_id.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-ALTER TABLE /*_*/external_user
-CHANGE COLUMN eu_wiki_id
-eu_local_id int unsigned NOT NULL;
diff --git a/maintenance/archives/patch-external_user.sql b/maintenance/archives/patch-external_user.sql
deleted file mode 100644
index 176b46d4..00000000
--- a/maintenance/archives/patch-external_user.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-CREATE TABLE /*_*/external_user (
- -- Foreign key to user_id
- eu_local_id int unsigned NOT NULL PRIMARY KEY,
-
- -- Some opaque identifier provided by the external database
- eu_external_id varchar(255) binary NOT NULL
-) /*$wgDBTableOptions*/;
-
-CREATE UNIQUE INDEX /*i*/eu_external_id ON /*_*/external_user (eu_external_id);
diff --git a/maintenance/archives/patch-externallinks-el_id.sql b/maintenance/archives/patch-externallinks-el_id.sql
new file mode 100644
index 00000000..d4b51b51
--- /dev/null
+++ b/maintenance/archives/patch-externallinks-el_id.sql
@@ -0,0 +1,8 @@
+--
+-- patch-extenallinks-el_id.sql
+--
+-- Bug 15441. Add externallinks.el_id.
+
+ALTER TABLE /*$wgDBprefix*/externallinks
+ ADD COLUMN el_id int unsigned NOT NULL AUTO_INCREMENT FIRST,
+ ADD PRIMARY KEY (el_id);
diff --git a/maintenance/archives/patch-iwl_prefix_title_from-non-unique.sql b/maintenance/archives/patch-iwl_prefix_title_from-non-unique.sql
new file mode 100644
index 00000000..bff63c74
--- /dev/null
+++ b/maintenance/archives/patch-iwl_prefix_title_from-non-unique.sql
@@ -0,0 +1,5 @@
+--
+-- Makes the iwl_prefix_title_from index for the iwlinks table non-unique
+--
+DROP INDEX /*i*/iwl_prefix_title_from ON /*_*/iwlinks;
+CREATE INDEX /*i*/iwl_prefix_title_from ON /*_*/iwlinks (iwl_prefix, iwl_title, iwl_from);
diff --git a/maintenance/archives/patch-iwlinks-from-title-index.sql b/maintenance/archives/patch-iwlinks-from-title-index.sql
new file mode 100644
index 00000000..8b73f9e3
--- /dev/null
+++ b/maintenance/archives/patch-iwlinks-from-title-index.sql
@@ -0,0 +1,4 @@
+--
+-- Recreates the iwl_prefix_from_title index for the iwlinks table
+--
+CREATE INDEX /*i*/iwl_prefix_from_title ON /*_*/iwlinks (iwl_prefix, iwl_from, iwl_title);
diff --git a/maintenance/archives/patch-kill-iwl_pft.sql b/maintenance/archives/patch-kill-iwl_pft.sql
deleted file mode 100644
index 96e14356..00000000
--- a/maintenance/archives/patch-kill-iwl_pft.sql
+++ /dev/null
@@ -1,7 +0,0 @@
---
--- Kill the old iwl_prefix_from_title index, which may be present on some
--- installs if they ran update.php between it being added and being renamed
---
-
-DROP INDEX /*i*/iwl_prefix_from_title ON /*_*/iwlinks;
-
diff --git a/maintenance/archives/patch-tag_summary.sql b/maintenance/archives/patch-tag_summary.sql
new file mode 100644
index 00000000..a81b3680
--- /dev/null
+++ b/maintenance/archives/patch-tag_summary.sql
@@ -0,0 +1,12 @@
+-- Rollup table to pull a LIST of tags simply without ugly GROUP_CONCAT that only works on MySQL 4.1+
+-- Andrew Garrett, 2009-01
+CREATE TABLE /*_*/tag_summary (
+ ts_rc_id int NULL,
+ ts_log_id int NULL,
+ ts_rev_id int NULL,
+ ts_tags BLOB NOT NULL
+) /*$wgDBTableOptions*/;
+
+CREATE UNIQUE INDEX /*i*/tag_summary_rc_id ON /*_*/tag_summary (ts_rc_id);
+CREATE UNIQUE INDEX /*i*/tag_summary_log_id ON /*_*/tag_summary (ts_log_id);
+CREATE UNIQUE INDEX /*i*/tag_summary_rev_id ON /*_*/tag_summary (ts_rev_id);
diff --git a/maintenance/archives/patch-valid_tag.sql b/maintenance/archives/patch-valid_tag.sql
new file mode 100644
index 00000000..994a5d53
--- /dev/null
+++ b/maintenance/archives/patch-valid_tag.sql
@@ -0,0 +1,4 @@
+-- Andrew Garrett, 2009-01
+CREATE TABLE /*_*/valid_tag (
+ vt_tag varchar(255) NOT NULL PRIMARY KEY
+) /*$wgDBTableOptions*/;
diff --git a/maintenance/archives/upgradeLogging.php b/maintenance/archives/upgradeLogging.php
index f0806458..0749bbf6 100644
--- a/maintenance/archives/upgradeLogging.php
+++ b/maintenance/archives/upgradeLogging.php
@@ -21,7 +21,7 @@
* @ingroup MaintenanceArchive
*/
-require( __DIR__ . '/../commandLine.inc' );
+require __DIR__ . '/../commandLine.inc';
/**
* Maintenance script that upgrade for log_id/log_deleted fields in a