You are here

public function DatabaseSchema_sqlsrv::dropField in Drupal driver for SQL Server and SQL Azure 7

Same name and namespace in other branches
  1. 7.3 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::dropField()
  2. 7.2 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::dropField()

Override DatabaseSchema::dropField().

@status complete

Overrides DatabaseSchema::dropField

2 calls to DatabaseSchema_sqlsrv::dropField()
DatabaseSchema_sqlsrv::changeField in sqlsrv/schema.inc
Override DatabaseSchema::changeField().
DatabaseSchema_sqlsrv::cleanUpTechnicalPrimaryColumn in sqlsrv/schema.inc
Try to clean up the technical primary column if possible.

File

sqlsrv/schema.inc, line 687
Database schema code for Microsoft SQL Server database servers.

Class

DatabaseSchema_sqlsrv

Code

public function dropField($table, $field) {
  if (!$this
    ->fieldExists($table, $field)) {
    return FALSE;
  }

  // Drop the related objects.
  $this
    ->dropFieldRelatedObjects($table, $field);
  $this->connection
    ->query('ALTER TABLE {' . $table . '} DROP COLUMN ' . $field);
  return TRUE;
}