r72898 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72897‎ | r72898 | r72899 >
Date:14:26, 13 September 2010
Author:greg
Status:ok
Tags:
Comment:
Add the "page" table back in when upgrading from really old MW versions using Postgres
Modified paths:
  • /trunk/phase3/includes/installer/PostgresUpdater.php (modified) (history)
  • /trunk/phase3/maintenance/postgres/archives/patch-page.sql (added) (history)

Diff [purge]

Index: trunk/phase3/maintenance/postgres/archives/patch-page.sql
@@ -0,0 +1,24 @@
 2+CREATE SEQUENCE page_page_id_seq;
 3+CREATE TABLE page (
 4+ page_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('page_page_id_seq'),
 5+ page_namespace SMALLINT NOT NULL,
 6+ page_title TEXT NOT NULL,
 7+ page_restrictions TEXT,
 8+ page_counter BIGINT NOT NULL DEFAULT 0,
 9+ page_is_redirect SMALLINT NOT NULL DEFAULT 0,
 10+ page_is_new SMALLINT NOT NULL DEFAULT 0,
 11+ page_random NUMERIC(15,14) NOT NULL DEFAULT RANDOM(),
 12+ page_touched TIMESTAMPTZ,
 13+ page_latest INTEGER NOT NULL,
 14+ page_len INTEGER NOT NULL
 15+);
 16+CREATE UNIQUE INDEX page_unique_name ON page (page_namespace, page_title);
 17+CREATE INDEX page_main_title ON page (page_title) WHERE page_namespace = 0;
 18+CREATE INDEX page_talk_title ON page (page_title) WHERE page_namespace = 1;
 19+CREATE INDEX page_user_title ON page (page_title) WHERE page_namespace = 2;
 20+CREATE INDEX page_utalk_title ON page (page_title) WHERE page_namespace = 3;
 21+CREATE INDEX page_project_title ON page (page_title) WHERE page_namespace = 4;
 22+CREATE INDEX page_mediawiki_title ON page (page_title) WHERE page_namespace = 8;
 23+CREATE INDEX page_random_idx ON page (page_random);
 24+CREATE INDEX page_len_idx ON page (page_len);
 25+
Index: trunk/phase3/includes/installer/PostgresUpdater.php
@@ -40,6 +40,7 @@
4141 # new tables
4242 array( 'addTable', 'category', 'patch-category.sql' ),
4343 array( 'addTable', 'mwuser', 'patch-mwuser.sql' ),
 44+ array( 'addTable', 'page', 'patch-page.sql' ),
4445 array( 'addTable', 'pagecontent', 'patch-pagecontent.sql' ),
4546 array( 'addTable', 'querycachetwo', 'patch-querycachetwo.sql' ),
4647 array( 'addTable', 'page_props', 'patch-page_props.sql' ),

Status & tagging log