Drupal 7.12

DatabaseSchemaObjectExistsException: Tabela uc_dotpay_pl_transaction już istnieje. w DatabaseSchema->createTable() (linia 652 z ..../includes/database/schema.inc).

CommentFileSizeAuthor
#3 dotpay_pl-installation_fix-1457502-3.patch828 bytesdepresz

Comments

PiotrJaniak’s picture

Assigned: Unassigned » PiotrJaniak
inTOOLS’s picture

This is caused by the line

drupal_install_schema('uc_dotpay_pl');

in uc_dotpay_pl.install file.

In the documentation of hook_install()

http://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_install/7

there is

If the module implements hook_schema(), the database tables will be created before this hook is fired.

And the uc_dotpay_pl of course implements hook_schema().

By the way, it is also not necessary to call

drupal_uninstall_schema('uc_dotpay_pl');

in hook_uninstall(), because in Drupal 7 hook_uninstall() takes care about tables created by hook_schema().

http://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_uninstall/7

depresz’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new828 bytes