I tried to update the biblio-module on my Drupal 7.0-rc1 / Postgres site today. Activating the module leads to:

DatabaseSchemaObjectExistsException: Table <em class="placeholder">biblio</em> already exists. in DatabaseSchema->createTable() (line 623 of /var/www/drupal/drupal-7.0-rc1/includes/database/schema.inc).

I tried to uninstall the module and all related database tables, but it is not listed on the uninstall-page for modules in my Drupal 7 system. Thus I do not see a way to clean up the database and try whether this also occurs on a fresh install of the module.

Cheers, Lars.

Comments

scor’s picture

It seems you have some inconsistencies between your system table and the rest of your database. I've just tried to install biblio on RC1, disable it, and the uninstall form offered me to uninstall biblio. Doing so removed all the biblio tables.

Can you explain how you did the upgrade? I think the best solution (unless you have data on your site) would be to reinstall Drupal and biblio.

Another alternative: after you've encountered this error, try to disable biblio and see if it offers to be uninstalled. If so, uninstall it and install it again.

grobe’s picture

Hi, thank you for the quick reply!

I have done quite a lot of updates and changes on that installation, my Drupal 7 site is currently mostly experimental. So I can actually go for a fresh install if necessary. Still - is there a way to manually remove all biblio-related data from the DB in such a case?

Cheers, Lars.

scor’s picture

you could remove all biblio* table manually, though I would suggest to try to let modules uninstall themselves if possible. In your case you could remove the table, try to reinstall the module and uninstall it so that the module can remove all its data (you can check biblio_uninstall() in biblio.install to see the other data being removed).

rjerome’s picture

Just as an aside, which may or may not be related... I updated my PostgreSQL installation last night an ran into a whole whack of db errors updating core modules, so it's not clear to me how thoroughly RC1 has been tested against Postgres.

grobe’s picture

Status: Active » Fixed

Hi,

ok, the core modules are not properly updating with rc1, which has been reported.

I managed to fix the situation for biblio as such:

  1. switching off the biblio module
  2. deleting old tables with biblio-data (psql DROP TABLE):
    • psql myDrupalDB
    • SELECT * FROM pg_tables;
    • DROP TABLE mytablename;
    • (repeat for each table containing "biblio"...)
  3. switching on the biblio module (causes database update, creating the tables
    • this caused quite a lot of warnings about implicit sequences and indices
  4. switching off the biblio module
    • this makes biblio appear on the list of modules that can be uninstalled
  5. switching on the biblio module - DONE!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.