Commit bc8a6df8 authored by Juozas Kaziukenas's avatar Juozas Kaziukenas

Removed forced drop database functionality

parent f59df8ca
......@@ -93,11 +93,15 @@ class MsSqlPlatform extends AbstractPlatform
*/
public function getDropDatabaseSQL($name)
{
// @todo do we really need to force drop?
return 'ALTER DATABASE [' . $name . ']
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
DROP DATABASE ' . $name . ';';
return 'DROP DATABASE ' . $name;
}
/**
* @override
*/
public function supportsCreateDropDatabase()
{
return false;
}
/**
......
......@@ -67,12 +67,7 @@ class MsSqlPlatformTest extends AbstractPlatformTestCase
public function testGeneratesDDLSnippets()
{
$dropDatabaseExpectation = <<<DDB
ALTER DATABASE [foobar]
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
DROP DATABASE foobar;
DDB;
$dropDatabaseExpectation = 'DROP DATABASE foobar';
$this->assertEquals('SHOW DATABASES', $this->_platform->getShowDatabasesSQL());
$this->assertEquals('CREATE DATABASE foobar', $this->_platform->getCreateDatabaseSQL('foobar'));
......
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