1

When trying to revert my updated exported changes on features from development site to production site via Drush, it returns DatabaseSchemaObjectExistsException error stating that there is an existing table already on the schema. Revert could not be completed, so the feature field_base component status is always Rebuilding. Shouldn't features detect if the table is already existing and ignore field creation if it already is? What could have caused this issue? Any possible workaround for this issue?

1 Answer 1

6

This is usually caused when the initial feature revert or install went bad. The feature has attempted to created a field (I've only seen it happen with fields) and it's got as far as creating the base table and it's revision table but as far as features is concerned the field doesn't exist. Features then tries to re-create the field but Drupal errors out with that error message because the fields tables already exist.

My usual solution to this is to take a backup of the fields tables (including revisions) and then drop the effected tabled. You should then be able to revert the feature successfully and restore the data from your backup.

2
  • 1
    Thanks. It make sense now, and yes, I do agree with your solution as a workaround. Jan 9, 2014 at 2:11
  • 4
    I ran into this error when reverting features on a development database that was synched from production using drush sql-sync. Drush sql-sync does not remove existing tables from the database. For a clean DB synchronization use the option --create-db: drush sql-sync @live @dev --create-db
    – batigolix
    Mar 12, 2014 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.