Page MenuHomePhabricator

1.29.0-alpha / PostgreSQL / Fails on update.php with "Error: 42P01 ERROR: relation "user_groups" does not exist"
Closed, DeclinedPublic

Description

MediaWiki 1.29.0-alpha (6517f21)
PHP 5.6.8 (apache2handler)
PostgreSQL 9.3.12
ICU 54.1

MediaWiki 1.29.0-alpha Updater

Your composer.lock file is up to date with current dependencies!
Going to run database updates for mwcorepg
Depending on the size of your database this may take a while!
Abort with control-c in the next five seconds (skip this countdown with --quick) ... 0
...index mwuser_pkey already set on mwuser table.

...

...column 'externallinks.el_index_60' already exists
...index 'el_index_60' on table 'externallinks' already exists
...index 'el_from_index_60' on table 'externallinks' already exists
Adding column 'user_groups.ug_expiry'
[238120cefdda1a345a6cf44f] [no req]   DBQueryError from line 1063 of ...\mw-core-pg\includes\libs\rdbms\database\Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: ALTER TABLE user_groups ADD ug_expiry TIMESTAMPTZ NULL
Function: Database::query
Error: 42P01 ERROR:  relation "user_groups" does not exist


Backtrace:
#0 ...\mw-core-pg\includes\libs\rdbms\database\DatabasePostgres.php(253): Database->reportQueryError(string, string,
string, string, boolean)
#1 ...\mw-core-pg\includes\libs\rdbms\database\Database.php(921): DatabasePostgres->reportQueryError(string, string,
string, string, boolean)
#2 ...\mw-core-pg\includes\installer\PostgresUpdater.php(693): Database->query(string)
#3 [internal function]: PostgresUpdater->addPgField(string, string, string)
#4 ...\mw-core-pg\includes\installer\DatabaseUpdater.php(471): call_user_func_array(array, array)
#5 ...\mw-core-pg\includes\installer\DatabaseUpdater.php(435): DatabaseUpdater->runUpdates(array, boolean)
#6 ...\mw-core-pg\maintenance\update.php(172): DatabaseUpdater->doUpdates(array)
#7 ...\mw-core-pg\maintenance\doMaintenance.php(111): UpdateMediaWiki->execute()
#8 ...\mw-core-pg\maintenance\update.php(217): require_once(string)
#9 {main}

Event Timeline

@mwjames It is a pretty old request - I wonder how did you get there in the first place.

I checked my old database files related to PostgreSQL updater problems around MediaWiki versions 1.15/1.17 and the table has always been here:

CREATE TABLE user_groups (
    ug_user integer,
    ug_group pg_catalog.text NOT NULL
);

I doubt we will be able to troubleshoot this now, so I'd propose we close this.