public function DatabaseSchema_sqlsrv::fieldSetNoDefault in Drupal driver for SQL Server and SQL Azure 7.2
Same name and namespace in other branches
- 7.3 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::fieldSetNoDefault()
- 7 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::fieldSetNoDefault()
Override DatabaseSchema::fieldSetNoDefault().
@status complete
Overrides DatabaseSchema::fieldSetNoDefault
1 call to DatabaseSchema_sqlsrv::fieldSetNoDefault()
- DatabaseSchema_sqlsrv::fieldSetDefault in sqlsrv/
schema.inc - Override DatabaseSchema::fieldSetDefault().
File
- sqlsrv/
schema.inc, line 1468 - Database schema code for Microsoft SQL Server database servers.
Class
Code
public function fieldSetNoDefault($table, $field) {
if (!$this
->fieldExists($table, $field)) {
throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot remove default value of field %table.%field: field doesn't exist.", array(
'%table' => $table,
'%field' => $field,
)));
}
$this->connection
->query_direct('ALTER TABLE [{' . $table . '}] DROP CONSTRAINT {' . $table . '}_' . $field . '_df');
}