public function Schema::fieldSetNoDefault in Drupal driver for SQL Server and SQL Azure 3.1.x
1 call to Schema::fieldSetNoDefault()
- Schema::fieldSetDefault in src/
Driver/ Database/ sqlsrv/ Schema.php
File
- src/
Driver/ Database/ sqlsrv/ Schema.php, line 387
Class
Namespace
Drupal\sqlsrv\Driver\Database\sqlsrvCode
public function fieldSetNoDefault($table, $field) {
@trigger_error('fieldSetNoDefault() is deprecated in drupal:8.7.0 and will be removed before drupal:9.0.0. Instead, call ::changeField() passing a full field specification. See https://www.drupal.org/node/2999035', E_USER_DEPRECATED);
if (!$this
->fieldExists($table, $field)) {
throw new SchemaObjectDoesNotExistException(t("Cannot remove default value of field %table.%field: field doesn't exist.", [
'%table' => $table,
'%field' => $field,
]));
}
$prefixInfo = $this
->getPrefixInfo($table, TRUE);
$constraint_name = $prefixInfo['table'] . '_' . $field . '_df';
$this
->dropConstraint($table, $constraint_name, FALSE);
}