Page MenuHomePhabricator

Update does not work on PostgreSQL
Closed, ResolvedPublic

Description

Author: sven

Description:
Fix for the described Problem

I get the following error when trying to upgrade with PostgreSQL:
Changing column type of "ipblocks.ipb_deleted" from "text" to "smallint"

Warning: pg_query(): Query failed: ERROR: column "ipb_deleted" cannot be cast to type "pg_catalog.int2" in /var/www/pentabarf.org/mediawiki/includes/DatabasePostgres.php on line 553
A database error has occurred
Query: ALTER TABLE ipblocks ALTER ipb_deleted TYPE smallint;
COMMIT;

Function:
Error: 1 ERROR: column "ipb_deleted" cannot be cast to type "pg_catalog.int2"

Backtrace:
#0 /var/www/pentabarf.org/mediawiki/includes/Database.php(799): DatabasePostgres->reportQueryError('ERROR: column ...', 1, 'ALTER TABLE ipb...', '', false)
#1 /var/www/pentabarf.org/mediawiki/maintenance/updaters.inc(1501): Database->query('ALTER TABLE ipb...')
#2 /var/www/pentabarf.org/mediawiki/maintenance/updaters.inc(946): do_postgres_updates()
#3 /var/www/pentabarf.org/mediawiki/maintenance/update.php(59): do_all_updates(false, true)
#4 {main}


Version: 1.12.x
Severity: major

Attached:

Details

Reference
bz13136

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.
StatusSubtypeAssignedTask
InvalidNone
ResolvedNone

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:07 PM
bzimport set Reference to bz13136.
bzimport added a subscriber: Unknown Object (MLST).

Applied in r31956, thanks for the patch!

Jdforrester-WMF subscribed.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.