Rename "user" and "text" when upgrading on PostgreSQL
authorMarcin Cieślak <saper@users.mediawiki.org>
Wed, 14 Mar 2012 20:20:53 +0000 (20:20 +0000)
committerAntoine Musso <hashar@free.fr>
Sat, 24 Mar 2012 08:10:59 +0000 (09:10 +0100)
commit556c5cf464b9103b04b247ed7dd7ee3051e9aef6
treee759941aae35092700ee5591d8755bced56e13c0
parentf8dc2abffcdbb59bebec148f2eccd0304b57cef0
Rename "user" and "text" when upgrading on PostgreSQL

Follow-up to r15791.

You can lie to me, but not to your installer.

Make DatabasePostgres::tableExists to check for real table names, not
faked ones.

DatabasePostgres is currently lying to the rest of the MediaWiki that
"mwuser" table is actually called "user" and that "pagecontents" is
called "text". While MediaWiki does not care, the installer (and updater
do).

This allows us to overcome first hurdle in getting MediaWiki 1.7.3 to
update to trunk on PostgreSQL and uncover further bugs.

For this commit to actually do something, we rename those tables when
upgrading to match what we have in maintenance/postgres/tables.sql

And by the way, tell installer not to check for "user" table, since most
PostgreSQL users will have "mwuser" instead. Picking "archive" instead.

Patchset2: wrapped commit message at 72 chars

Change-Id: Ic874e92bb1adda3430d3292423d4f3617c25456c
includes/db/DatabasePostgres.php
includes/installer/DatabaseInstaller.php
includes/installer/PostgresUpdater.php