You are here

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

Same name and namespace in other branches
  1. 4.2.x src/Driver/Database/sqlsrv/Schema.php \Drupal\sqlsrv\Driver\Database\sqlsrv\Schema::dropTable()
  2. 3.1.x src/Driver/Database/sqlsrv/Schema.php \Drupal\sqlsrv\Driver\Database\sqlsrv\Schema::dropTable()
  3. 4.0.x src/Driver/Database/sqlsrv/Schema.php \Drupal\sqlsrv\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

src/Driver/Database/sqlsrv/Schema.php, line 217

Class

Schema

Namespace

Drupal\sqlsrv\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;
}