http://www.mediawiki.org/wiki/Special:Code/MediaWiki/70575

Revision: 70575
Author:   peter17
Date:     2010-08-06 15:58:52 +0000 (Fri, 06 Aug 2010)

Log Message:
-----------
Adding a globaltemplatelinks table

Added Paths:
-----------
    
branches/iwtransclusion/phase3/maintenance/archives/patch-globaltemplatelinks.sql

Added: 
branches/iwtransclusion/phase3/maintenance/archives/patch-globaltemplatelinks.sql
===================================================================
--- 
branches/iwtransclusion/phase3/maintenance/archives/patch-globaltemplatelinks.sql
                           (rev 0)
+++ 
branches/iwtransclusion/phase3/maintenance/archives/patch-globaltemplatelinks.sql
   2010-08-06 15:58:52 UTC (rev 70575)
@@ -0,0 +1,31 @@
+-- Table tracking interwiki transclusions in the spirit of templatelinks.
+-- This table tracks transclusions of this wiki's templates on another wiki
+-- The gtl_from_* fields describe the (remote) page the template is 
transcluded from
+-- The gtl_to_* fields describe the (local) template being transcluded
+CREATE TABLE /*_*/globaltemplatelinks (
+  -- The wiki ID of the remote wiki
+  gtl_from_wiki varchar(64) NOT NULL,
+
+  -- The page ID of the calling page on the remote wiki
+  gtl_from_page int unsigned NOT NULL,
+
+  -- The namespace name of the calling page on the remote wiki
+  -- Needed for display purposes, since the foreign namespace ID doesn't 
necessarily match a local one
+  gtl_from_namespace varchar(255) NOT NULL,
+
+  -- The title of the calling page on the remote wiki
+  -- Needed for display purposes
+  gtl_from_title varchar(255) binary NOT NULL,
+
+  -- The wiki ID of the wiki that hosts the transcluded page
+  gtl_to_wiki varchar(64) NOT NULL,
+
+  -- The namespace of the transcluded page on that wiki
+  gtl_to_namespace int NOT NULL,
+
+  -- The title of the transcluded page on that wiki
+  gtl_to_title varchar(255) binary NOT NULL
+) /*$wgDBTableOptions*/;
+
+CREATE UNIQUE INDEX /*i*/gtl_to_from ON /*_*/globaltemplatelinks (gtl_to_wiki, 
gtl_to_namespace, gtl_to_title, gtl_from_wiki, gtl_from_page);
+CREATE UNIQUE INDEX /*i*/gtl_from_to ON /*_*/globaltemplatelinks 
(gtl_from_wiki, gtl_from_page, gtl_to_wiki, gtl_to_namespace, gtl_to_title);


Property changes on: 
branches/iwtransclusion/phase3/maintenance/archives/patch-globaltemplatelinks.sql
___________________________________________________________________
Added: svn:eol-style
   + native



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to