Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
bc8a6df8
Commit
bc8a6df8
authored
Nov 16, 2010
by
Juozas Kaziukenas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed forced drop database functionality
parent
f59df8ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
MsSqlPlatform.php
lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php
+9
-5
MsSqlPlatformTest.php
tests/Doctrine/Tests/DBAL/Platforms/MsSqlPlatformTest.php
+1
-6
No files found.
lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php
View file @
bc8a6df8
...
...
@@ -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
;
}
/**
...
...
tests/Doctrine/Tests/DBAL/Platforms/MsSqlPlatformTest.php
View file @
bc8a6df8
...
...
@@ -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'
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment