Skip to main content
documentation says prefixing is unneeded on table name and likely no curly braces are needed either
Source Link

I had the same issue and finally I just manually did it in hook_uninstall(), I could find no other recourse.

function mymodule_uninstall() {
  $table_name = 'mytable';
  if (db_table_exists('{' . $table_name . '}')) {
    db_drop_table('{' . $table_name . '}');
  }
}

Hope this saves someone else some time.

I had the same issue and finally I just manually did it in hook_uninstall(), I could find no other recourse.

function mymodule_uninstall() {
  $table_name = 'mytable';
  if (db_table_exists('{' . $table_name . '}')) {
    db_drop_table('{' . $table_name . '}');
  }
}

Hope this saves someone else some time.

I had the same issue and finally I just manually did it in hook_uninstall(), I could find no other recourse.

function mymodule_uninstall() {
  $table_name = 'mytable';
  if (db_table_exists($table_name)) {
    db_drop_table($table_name);
  }
}

Hope this saves someone else some time.

added suggested edit for db_table_exists
Source Link

I had the same issue and finally I just manually did it in hook_uninstall(), I could find no other recourse.

function mymodule_uninstall() {
  $table_name = 'mytable';
  if (db_table_exists('{' . $table_name . '}')) {
    db_drop_table('{' . $table_name . '}');
  }
}

Hope this saves someone else some time.

I had the same issue and finally I just manually did it in hook_uninstall(), I could find no other recourse.

function mymodule_uninstall() {
  $table_name = 'mytable';
  db_drop_table('{' . $table_name . '}');
}

Hope this saves someone else some time.

I had the same issue and finally I just manually did it in hook_uninstall(), I could find no other recourse.

function mymodule_uninstall() {
  $table_name = 'mytable';
  if (db_table_exists('{' . $table_name . '}')) {
    db_drop_table('{' . $table_name . '}');
  }
}

Hope this saves someone else some time.

Source Link

I had the same issue and finally I just manually did it in hook_uninstall(), I could find no other recourse.

function mymodule_uninstall() {
  $table_name = 'mytable';
  db_drop_table('{' . $table_name . '}');
}

Hope this saves someone else some time.

Post Made Community Wiki by nicholas.alipaz