You are here

public function Schema::dropTable in Drupal driver for SQL Server and SQL Azure 3.0.x

Same name and namespace in other branches
  1. 8.2 drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php \Drupal\Driver\Database\sqlsrv\Schema::dropTable()
  2. 8 drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php \Drupal\Driver\Database\sqlsrv\Schema::dropTable()

Drop a table.

Parameters

$table: The table to be dropped.

Return value

TRUE if the table was successfully dropped, FALSE if there was no table by that name to begin with.

Overrides Schema::dropTable

File

drivers/lib/Drupal/Driver/Database/sqlsrv/Schema.php, line 217

Class

Schema

Namespace

Drupal\Driver\Database\sqlsrv

Code

public function dropTable($table) {
  if (!$this
    ->tableExists($table)) {
    return FALSE;
  }
  $this->connection
    ->queryDirect('DROP TABLE {' . $table . '}');
  $this
    ->resetColumnInformation($table);
  return TRUE;
}