Commit 8d380327 authored by Juozas Kaziukenas's avatar Juozas Kaziukenas

Fixed identifiers quoting

Signed-off-by: 's avatarJuozas Kaziukenas <juozas@juokaz.com>
parent 2cdb2fe8
......@@ -95,6 +95,32 @@ class MsSqlPlatform extends AbstractPlatform
return 'DROP DATABASE ' . $name;
}
/**
* @override
*/
public function getColumnDeclarationSQL($name, array $field)
{
$declaration = parent::getColumnDeclarationSQL($name, $field);
$name = substr($declaration, 0, strpos($declaration, ' '));
$spec = substr($declaration, strpos($declaration, ' ')+1);
if (strpos($name, '[') === false)
{
$name = $this->quoteIdentifier($name);
}
return $name . ' ' . $spec;
}
/**
* @override
*/
public function quoteIdentifier($str)
{
return '[' . $str . ']';
}
/**
* @override
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment