When updating from 2.26 to 2.30 after running update.php produces the following error:

The following updates returned messages

entityreference module

Update #7003
Failed: DatabaseSchemaObjectExistsException: Cannot add field field_data_field_commands.field_commands_revision_id: field already exists. in DatabaseSchema_mysql->addField() (line 328 of /srv/bindings/a7c040292fbe4a249eede72280ea323d/code/includes/database/mysql/schema.inc).

After rerunning update.php (as described in the documentation), 6 database updates remain:

6 PENDING UPDATES
entityreference module

7003 - Add "revision-id" to the field schema.
oa_core module

7224 - Enable paragraphs module
7225 - Enable oa_angular module
7226 - Enable features_template, references_dialog, oa_files and oa_related, select2widget modules
7227 - Fix accidentatly given roles.
7228 - Change the oa_unpublished gids from nid to uid. Since the access change is rather simple, we're just scripting it for so big sites do not have a super long update.

Comments

mpotter’s picture

Sounds like either a previous update failed leaving a partially created field, or you were already using a version of entityreferences that had the revision_id patch. Otherwise there shouldn't be any existing field that ends with _revision_id.

That specific field (field_commands) is used for Command Button fieldable panels panes. So you might need to find the place on your site that adds any Create Content buttons via Command buttons and remove that.

You can try disabling the Command Buttons module, then uninstalling it via "drush pm-uninstall command_buttons" and then try to reinstall the command buttons module.

Argus’s picture

This happened on my testing OA site. I didn't change anything on it, I just used OA out of the box. The site was created on the 2.24 release, and updated without problems to 2.25 and 2.26. There were no errors during the updates as far as I can recall. I'm not looking for a hotfix on this, just posting it in case anyone else has the same error.

Point of notice: the update to 2.30 does seem to require a few consecutive runs of update.php

JKingsnorth’s picture

Status: Active » Postponed (maintainer needs more info)

Hi Argus, any news on this? We've just updated to 2.33 and we're not seeing any pending updates.

Argus’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Me neither.