Commit a8214c12 authored by flip111's avatar flip111

Update CreateSchemaSqlCollector.php setting default namespace/schema name

The namespace is used as name for the database schema. For SQL Server the default schema name is "dbo" and not "default".
parent 8f119eea
......@@ -105,7 +105,15 @@ class CreateSchemaSqlCollector extends AbstractVisitor
*/
private function getNamespace($asset)
{
$namespace = $asset->getNamespaceName() ?: 'default';
$namespace = $asset->getNamespaceName();
if ($namespace === null) {
if ($this->platform instanceof \Doctrine\DBAL\Platforms\SQLServerPlatform) {
$namespace = 'dbo';
} else {
$namespace = 'default';
}
}
if ( !isset($this->createTableQueries[$namespace])) {
$this->createTableQueries[$namespace] = array();
......
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