Page MenuHomePhabricator

update.php failed to add column "rev_sha1" to table "revision".
Closed, ResolvedPublic

Description

Author: beta

Description:
After upgrade to the head version of MediaWiki,
our server output print following message every time:

MediaWiki internal error.

Original exception: exception 'DBQueryError' with message 'A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: http://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: SELECT rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_user_text,rev_user,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,page_namespace,page_title,page_latest FROM "page","revision" WHERE page_id = '1' AND rev_id = '1606' AND (page_id=rev_page) LIMIT 1
Function: Revision::fetchFromConds
Error: 1 ERROR: column "rev_sha1" does not exist
LINE 1: ...,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,p...
^
' in D:\App\mediawiki\includes\db\Database.php:874

I did run the "maintenance\update.php", but got:

MediaWiki 1.19alpha Updater

Going to run database updates for my_wiki
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
...category table already exists.

... ommitted ...

Populating rev_len column
...doing rev_id from 1 to 200
A database query syntax error has occurred.
The last attempted database query was:
"SELECT rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_user_text,rev
_user,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1 FROM "revision"

WHERE (rev_id >= 1) AND (rev_id <= 200) AND (rev_len IS NULL)  "

from within function "PopulateRevisionLength::doDBUpdates".
Database returned error "1: ERROR: column "rev_sha1" does not exist
LINE 1: ...,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1 ...

Our environment:

OS: Windows Server 2008 R2
Database: PostgreSQL Database Server 8.3

Version: 1.20.x
Severity: critical
OS: other
Platform: PC

Details

Reference
bz30383

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 11:52 PM
bzimport set Reference to bz30383.
bzimport added a subscriber: Unknown Object (MLST).

This was previously reported in the code review comments section on r94289.

Note this field has been reverted in r94541; core schema changes need to be discussed ahead of time.

Just svn up'd and ran update.php and got this :(

Patches for postgres in r101151

was resolved invalid, but since I was getting similar errors, changing to "fixed"

Cookbook cookbooks.sre.debmonitor.remove-hosts run by jmm: for 0 hosts:

Cookbook cookbooks.sre.debmonitor.remove-hosts run by jmm: for 1 hosts: cp5013.eqsin.wmnet

Cookbook cookbooks.sre.debmonitor.remove-hosts run by jmm: for 1 hosts: cp5014.eqsin.wmnet

Cookbook cookbooks.sre.debmonitor.remove-hosts run by jmm: for 1 hosts: cp5015.eqsin.wmnet

Cookbook cookbooks.sre.debmonitor.remove-hosts run by jmm: for 1 hosts: cp5016.eqsin.wmnet