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

getDefaultValueDeclarationSQL() public method

{@inheritDoc}
public getDefaultValueDeclarationSQL ( $field )
    public function getDefaultValueDeclarationSQL($field)
    {
        if (!isset($field['default'])) {
            return empty($field['notnull']) ? ' NULL' : '';
        }
        if (!isset($field['type'])) {
            return " DEFAULT '" . $field['default'] . "'";
        }
        if (in_array((string) $field['type'], array('Integer', 'BigInt', 'SmallInt'))) {
            return " DEFAULT " . $field['default'];
        }
        if (in_array((string) $field['type'], array('DateTime', 'DateTimeTz')) && $field['default'] == $this->getCurrentTimestampSQL()) {
            return " DEFAULT " . $this->getCurrentTimestampSQL();
        }
        if ((string) $field['type'] == 'Boolean') {
            return " DEFAULT '" . $this->convertBooleans($field['default']) . "'";
        }
        return " DEFAULT '" . $field['default'] . "'";
    }
SQLServerPlatform