When I run update.php I am getting following error. Please help me. Am I missing something.
The following updates returned messages
geocoder module
Update #7101
Failed: DatabaseSchemaObjectExistsException: Table cache_geocoder already exists. in DatabaseSchema->createTable() (line 660 of G:\Acquia_Sites\Dev_Desktop\uwcx-ra\docroot\includes\database\schema.inc).
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 2866059-avoid-table-conflicts.patch | 660 bytes | greggles |
Comments
Comment #2
gmaximus commentedI've just run into the same bug when updating a website. Any further development or information on this?
Comment #3
guillaumeduveauIn Drupal 7, hook_schema() automatically installs the DB table(s), so adding an update to install the schema produces this error. The whole geocoder_update_7101() should be deleted. Either you patch the module, either you modify the schema_version in your DB:
UPDATE system SET schema_version=7101 WHERE name='geocoder' and schema_version=7100;Comment #4
polComment #5
gregglesI'm running into this issue as well and it seems like a bug to me, so reopening and recategorizing for feedback on that.
My scenario is that I've been running geocoder 7.x-1.2 for a while. I just upgraded to geocoder 7.x-1.3 and am getting the error when running "drush updb:"
As far as I know it's not generally right to manually call
drupal_install_schema('geocoder');from inside of a hook update. I don't know why it's not working in this specific instance. However, if that seems like the thing you really want to do, it could at least be wrapped in a db_table exists, e.g.What do you think would be the right way to solve this?
Comment #6
gregglesHere's a patch that minimally addresses both of the issues I mentioned.
Comment #7
amazingrandoI applied the patch in #6 and all is well. Thank you!
Comment #8
johnhanley commented+1 for #6 patch.
Comment #10
poker10 commentedYes, it is not good to run
drupal_install_schema()inside an update hook. The patch #6 looks good, though not sure how many sites it will help after so many years. But better to have it right, so I have committed this. Thanks all!