Doctrine\DBAL\Platforms\SQLServerPlatform::getDefaultConstraintDeclarationSQL PHP Method

getDefaultConstraintDeclarationSQL() public method

Returns the SQL snippet for declaring a default constraint.
public getDefaultConstraintDeclarationSQL ( string $table, array $column ) : string
$table string Name of the table to return the default constraint declaration for.
$column array Column definition.
return string
    public function getDefaultConstraintDeclarationSQL($table, array $column)
    {
        if (!isset($column['default'])) {
            throw new \InvalidArgumentException("Incomplete column definition. 'default' required.");
        }
        $columnName = new Identifier($column['name']);
        return ' CONSTRAINT ' . $this->generateDefaultConstraintName($table, $column['name']) . $this->getDefaultValueDeclarationSQL($column) . ' FOR ' . $columnName->getQuotedName($this);
    }
SQLServerPlatform