You are here

function db_drop_table in Drupal 7

Same name and namespace in other branches
  1. 8 core/includes/database.inc \db_drop_table()
  2. 6 includes/database.mysql-common.inc \db_drop_table()
  3. 6 includes/database.pgsql.inc \db_drop_table()

Drops a table.

Parameters

$table: The table to be dropped.

Related topics

25 calls to db_drop_table()
BasicUpgradePath::testFailedUpgrade in modules/simpletest/tests/upgrade/upgrade.test
Test a failed upgrade, and verify that the failure is reported.
block_update_7006 in modules/block/block.install
Recreates cache_block table.
DatabaseTestCase::installTables in modules/simpletest/tests/database_test.test
Set up several tables needed by a certain test.
DrupalWebTestCase::tearDown in modules/simpletest/drupal_web_test_case.php
Delete created files and temporary files directory, delete the tables created by setUp(), and reset the database prefix.
drupal_uninstall_schema in includes/common.inc
Removes all tables defined in a module's hook_schema().

... See full list

File

includes/database/database.inc, line 2941
Core systems for the database layer.

Code

function db_drop_table($table) {
  return Database::getConnection()
    ->schema()
    ->dropTable($table);
}