Page MenuHomePhabricator

A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Closed, ResolvedPublic

Description

php 7.3, postgresql 11
Command: php update.php failed with this error.

Creating user_points_weekly table ...[57e7dcec702bcae7715d655b] [no req]   Wikimedia\Rdbms\DBQueryError from line 1587 of ../mediawiki/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: CREATE TABLE user_points_weekly (
 up_id        INT(11) NOT NULL default nextval('user_points_weekly_up_id_seq')  PRIMARY KEY,
 up_user_id   INT(11) NOT NULL default 0,
 up_user_name TEXT    NOT NULL default '',
 up_points    FLOAT   NOT NULL default 0
 )

Function: Wikimedia\Rdbms\Database::sourceFile( ../mediawiki/extensions/SocialProfile/UserStats/sql/user_points_weekly.postgres.sql )
Error: 42601 ERROR:  syntax error at or near "("
LINE 2:  up_id        INT(11) NOT NULL default nextval('user_points_...
                         ^


Backtrace:
#0 ../mediawiki/includes/libs/rdbms/database/Database.php(1556): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, string, string, string)
#1 ../mediawiki/includes/libs/rdbms/database/Database.php(1274): Wikimedia\Rdbms\Database->reportQueryError(string, string, string, string, boolean)
#2 ../mediawiki/includes/libs/rdbms/database/Database.php(4430): Wikimedia\Rdbms\Database->query(string, string)
#3 ../mediawiki/includes/libs/rdbms/database/Database.php(4365): Wikimedia\Rdbms\Database->sourceStream(resource (closed), NULL, NULL, string, NULL)
#4 ../mediawiki/includes/installer/DatabaseUpdater.php(690): Wikimedia\Rdbms\Database->sourceFile(string)
#5 ../mediawiki/includes/installer/DatabaseUpdater.php(733): DatabaseUpdater->applyPatch(string, boolean, string)
#6 ../mediawiki/includes/installer/DatabaseUpdater.php(489): DatabaseUpdater->addTable(string, string, boolean)
#7 ../mediawiki/includes/installer/DatabaseUpdater.php(457): DatabaseUpdater->runUpdates(array, boolean)
#8 ../mediawiki/maintenance/update.php(203): DatabaseUpdater->doUpdates(array)
#9 ../mediawiki/maintenance/doMaintenance.php(96): UpdateMediaWiki->execute()
#10 ../mediawiki/maintenance/update.php(266): require_once(string)
#11 {main}

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 18 2019, 5:24 AM
Restricted Application added a project: Social-Tools. · View Herald TranscriptAug 18 2019, 7:26 AM

Change 530770 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/SocialProfile@master] Fix data types for Postgres

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

Daimona claimed this task.Aug 18 2019, 11:59 AM

Change 530770 merged by jenkins-bot:
[mediawiki/extensions/SocialProfile@master] Fix data types for Postgres

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

Daimona closed this task as Resolved.Tue, Aug 27, 5:54 PM
Daimona removed a project: Patch-For-Review.