Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
During a recent update I received the following error (Drush error and Update.php error below):
Table image_dimensions already exists.
file_entity module
Update #7200
Failed: DatabaseSchemaObjectExistsException: Table <em class="placeholder">image_dimensions</em> already exists. in DatabaseSchema->createTable() (line 657 of /drupal/includes/database/schema.inc).
Current resolution: Drop the "image_dimensions" database table.
Comments
Comment #1
jpwester CreditAttribution: jpwester commentedI am seeing the same thing. Is there a more elegant solution?
Comment #2
ParisLiakos CreditAttribution: ParisLiakos commentedi cant understand why the table was already there..you was upgrading from unstable6 to nstable7?
Comment #3
Chris CharltonFor I was stuck in an update loop - every time I ran update.php Drupal/Drush kept reporting update 7200 needed to run. I ended up getting past this somehow.
Comment #4
Devin Carlson CreditAttribution: Devin Carlson commentedAs rootatwc mentioned in #2 the image_dimensions table is only created during module installation or by update 7200.
A borked uninstall of File entity or another contrib module creating the same table are the only possible causes of the table existing (that I can think of). Otherwise, I haven't been able to reproduce this problem.
Comment #5
jpwester CreditAttribution: jpwester commentedI was upgrading from unstable6 to unstable7, yes.
Comment #6
nixter CreditAttribution: nixter commentedAn easy way to bypass the creation of a table that exists and get Drupal to stop saying you have an update like this. (7200 - Create the {image_dimensions} database table.) is to go into the System table and change the Schema from 7199 to 7200.
This worked like a champ and got ride of the error we had.
Here is another example of a simular issue with the field collection module. Comment #5 and #6
#1783456: Enable re-running failed update_7001(), adding revision fields
Comment #7
bousley CreditAttribution: bousley commentedStill having this issue years alter and I'm unable to fix on Acquia Dev Desktop or on the Cloud. So, I'm unable to update Drupal core for a site that I've taken over maintenance on. When I attempt to do so this is the message I get: