function DatabaseSchema_pgsql::fieldSetNoDefault
Overrides DatabaseSchema::fieldSetNoDefault
1 call to DatabaseSchema_pgsql::fieldSetNoDefault()
- DatabaseSchema_pgsql::changeField in includes/
database/ pgsql/ schema.inc
File
-
includes/
database/ pgsql/ schema.inc, line 594
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('ALTER TABLE {' . $table . '} ALTER COLUMN "' . $field . '" DROP DEFAULT');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.