summaryrefslogtreecommitdiff
path: root/maintenance/archives/patch-iwlinks.sql
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/archives/patch-iwlinks.sql')
-rw-r--r--maintenance/archives/patch-iwlinks.sql16
1 files changed, 16 insertions, 0 deletions
diff --git a/maintenance/archives/patch-iwlinks.sql b/maintenance/archives/patch-iwlinks.sql
new file mode 100644
index 00000000..89b34cb1
--- /dev/null
+++ b/maintenance/archives/patch-iwlinks.sql
@@ -0,0 +1,16 @@
+--
+-- Track inline interwiki links
+--
+CREATE TABLE /*_*/iwlinks (
+ -- page_id of the referring page
+ iwl_from int unsigned NOT NULL default 0,
+
+ -- Interwiki prefix code of the target
+ iwl_prefix varbinary(20) NOT NULL default '',
+
+ -- Title of the target, including namespace
+ iwl_title varchar(255) binary NOT NULL default ''
+) /*$wgDBTableOptions*/;
+
+CREATE UNIQUE INDEX /*i*/iwl_from ON /*_*/iwlinks (iwl_from, iwl_prefix, iwl_title);
+CREATE UNIQUE INDEX /*i*/iwl_prefix_title_from ON /*_*/iwlinks (iwl_prefix, iwl_title, iwl_from);