summaryrefslogtreecommitdiff
path: root/maintenance/postgres/archives/patch-sites.sql
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
commit08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch)
tree577a29fb579188d16003a209ce2a2e9c5b0aa2bd /maintenance/postgres/archives/patch-sites.sql
parentcacc939b34e315b85e2d72997811eb6677996cc1 (diff)
Update to MediaWiki 1.21.1
Diffstat (limited to 'maintenance/postgres/archives/patch-sites.sql')
-rw-r--r--maintenance/postgres/archives/patch-sites.sql31
1 files changed, 31 insertions, 0 deletions
diff --git a/maintenance/postgres/archives/patch-sites.sql b/maintenance/postgres/archives/patch-sites.sql
new file mode 100644
index 00000000..a4f9ed9e
--- /dev/null
+++ b/maintenance/postgres/archives/patch-sites.sql
@@ -0,0 +1,31 @@
+CREATE SEQUENCE sites_site_id_seq;
+CREATE TABLE sites (
+ site_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('sites_site_id_seq'),
+ site_global_key TEXT NOT NULL,
+ site_type TEXT NOT NULL,
+ site_group TEXT NOT NULL,
+ site_source TEXT NOT NULL,
+ site_language TEXT NOT NULL,
+ site_protocol TEXT NOT NULL,
+ site_domain TEXT NOT NULL,
+ site_data TEXT NOT NULL,
+ site_forward SMALLINT NOT NULL,
+ site_config TEXT NOT NULL
+);
+CREATE UNIQUE INDEX site_global_key ON sites (site_global_key);
+CREATE INDEX site_type ON sites (site_type);
+CREATE INDEX site_group ON sites (site_group);
+CREATE INDEX site_source ON sites (site_source);
+CREATE INDEX site_language ON sites (site_language);
+CREATE INDEX site_protocol ON sites (site_protocol);
+CREATE INDEX site_domain ON sites (site_domain);
+CREATE INDEX site_forward ON sites (site_forward);
+
+CREATE TABLE site_identifiers (
+ si_site INTEGER NOT NULL,
+ si_type TEXT NOT NULL,
+ si_key TEXT NOT NULL
+);
+CREATE UNIQUE INDEX si_type_key ON site_identifiers (si_type, si_key);
+CREATE INDEX si_site ON site_identifiers (si_site);
+CREATE INDEX si_key ON site_identifiers (si_key);