Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292436

DatabaseSchemaObjectExistsException: Table already exists. in DatabaseSchema

$
0
0

Why do we have this exception? (and in general why does D7 have so much worse handling of things like this??)

the error comes when a user tries to install a module which was previously installed and the .instal chokes simply because the table was already there.. and worse, it kills the process of enabling all the other modules that were trying to be enabled.

pretty sure in D6 we'd just skip this.. why does everything in D7 cause a stupid exception and just bail with a stupid message: "The website encountered an unexpected error. Please try again later. " really? try again later? why? is this magically going to fix itself?

what are we trying to avoid here?

- could the existing tables possibly be of an old design and therefore we would need to run updates on them? but can't db code see this and run the updates; most likely the system table entry is still there so we do know what version of schema exists?

- are we trying to force module designers to write code in all .installs to first check if tables exist and then handle this in the .install file? why would we want to replicate this code 200 times on a project?? why not have db code handle this?

really tired of seeing these exceptions all the time for no apparently useful reason.


Viewing all articles
Browse latest Browse all 292436

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>