Page MenuHomePhabricator

1.31.0-alpha / update.php causes Error: 22007 ERROR: invalid input syntax for type timestamp with time zone: ""
Closed, ResolvedPublic

Description

MediaWiki	1.31.0-alpha (ed6cb7d)
PHP	7.1.1 (apache2handler)
PostgreSQL	9.3.12
ICU	57.1

Stack

Adding column 'protected_titles.pt_reason_id'
Creating comment table ...done.
Adding index site_stats_pkey to table site_stats ...done.
Creating ip_changes table ...[101e34cba63a359df8228639] [no req]   Wikimedia\Rdbms\DBQueryError from line 1168 of D:\xampp\htdocs
\mw-master-pg\includes\libs\rdbms\database\Database.php: A database query error has occurred. Did you forget to run your applicat
ion's database schema updater after upgrading?
Query: CREATE TABLE ip_changes (
 ipc_rev_id        INTEGER PRIMARY KEY NOT NULL DEFAULT nextval('ip_changes_ipc_rev_id_seq'),
 ipc_rev_timestamp TIMESTAMPTZ NOT NULL DEFAULT '',
 ipc_hex           BYTEA NOT NULL DEFAULT ''
 )

Function: Wikimedia\Rdbms\Database::sourceFile( .../maintenance/postgres/archives/patch-ip_changes.sql )

Error: 22007 ERROR:  invalid input syntax for type timestamp with time zone: ""


Backtrace:
#0 ...\includes\libs\rdbms\database\DatabasePostgres.php(262): Wikimedia\Rdbms\Database->reportQueryErro
r(string, string, string, string, boolean)
#1 ...\includes\libs\rdbms\database\Database.php(980): Wikimedia\Rdbms\DatabasePostgres->reportQueryErro
r(string, string, string, string, boolean)
#2 ...\includes\libs\rdbms\database\Database.php(3394): Wikimedia\Rdbms\Database->query(string, string)
#3 ...\includes\libs\rdbms\database\Database.php(3342): Wikimedia\Rdbms\Database->sourceStream(unknown t
ype, NULL, NULL, string, NULL)
#4 ...\includes\installer\DatabaseUpdater.php(683): Wikimedia\Rdbms\Database->sourceFile(string)
#5 ...\includes\installer\DatabaseUpdater.php(726): DatabaseUpdater->applyPatch(string, boolean, string)

#6 ...\includes\installer\DatabaseUpdater.php(482): DatabaseUpdater->addTable(string, string)
#7 ...\includes\installer\DatabaseUpdater.php(446): DatabaseUpdater->runUpdates(array, boolean)
#8 ...\maintenance\update.php(202): DatabaseUpdater->doUpdates(array)
#9 ...\maintenance\doMaintenance.php(95): UpdateMediaWiki->execute()
#10 ...\maintenance\update.php(247): require_once(string)
#11 {main}

Caused by

Most likely caused by https://github.com/wikimedia/mediawiki/commit/70a602dde40e3694f8ef8b9c779a528c17a48f42.

Event Timeline

mwjames created this task.Nov 29 2017, 8:06 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 29 2017, 8:06 PM
Reedy added a subscriber: Reedy.EditedNov 29 2017, 8:10 PM

Looks like PS3 of that change got reverted, as the cherry pick into REL1_30 is correct

https://github.com/wikimedia/mediawiki/commit/a8f1056b097fdbab1c64d56b971f7d350bd5f00d

Change 394127 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/core@master] Remove DEFAULT '' from postgres ip_changes.ipc_rev_timestamp

https://gerrit.wikimedia.org/r/394127

Change 394127 merged by jenkins-bot:
[mediawiki/core@master] Remove DEFAULT '' from postgres ip_changes.ipc_rev_timestamp

https://gerrit.wikimedia.org/r/394127

Reedy closed this task as Resolved.Nov 29 2017, 9:06 PM
Reedy claimed this task.
Reedy edited projects, added MediaWiki-General; removed Patch-For-Review.