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
ba4d1bb3
Commit
ba4d1bb3
authored
Nov 25, 2009
by
guilhermeblanco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix create/drop database against PgSQL. Thanks Hannes and Russ for patch
parent
555b0976
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
4 deletions
+39
-4
PostgreSqlSchemaManager.php
lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php
+32
-0
CliController.php
lib/Doctrine/ORM/Tools/Cli/CliController.php
+7
-4
No files found.
lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php
View file @
ba4d1bb3
...
@@ -46,6 +46,38 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
...
@@ -46,6 +46,38 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
}
}
}
}
public
function
dropDatabase
(
$database
)
{
$params
=
$this
->
_conn
->
getParams
();
$params
[
"dbname"
]
=
"postgres"
;
$tmpPlatform
=
$this
->
_platform
;
$tmpConn
=
$this
->
_conn
;
$this
->
_conn
=
\Doctrine\DBAL\DriverManager
::
getConnection
(
$params
);
$this
->
_platform
=
$this
->
_conn
->
getDatabasePlatform
();
parent
::
dropDatabase
(
$database
);
$this
->
_platform
=
$tmpPlatform
;
$this
->
_conn
=
$tmpConn
;
}
public
function
createDatabase
(
$database
)
{
$params
=
$this
->
_conn
->
getParams
();
$params
[
"dbname"
]
=
"postgres"
;
$tmpPlatform
=
$this
->
_platform
;
$tmpConn
=
$this
->
_conn
;
$this
->
_conn
=
\Doctrine\DBAL\DriverManager
::
getConnection
(
$params
);
$this
->
_platform
=
$this
->
_conn
->
getDatabasePlatform
();
parent
::
createDatabase
(
$database
);
$this
->
_platform
=
$tmpPlatform
;
$this
->
_conn
=
$tmpConn
;
}
protected
function
_getPortableTriggerDefinition
(
$trigger
)
protected
function
_getPortableTriggerDefinition
(
$trigger
)
{
{
return
$trigger
[
'trigger_name'
];
return
$trigger
[
'trigger_name'
];
...
...
lib/Doctrine/ORM/Tools/Cli/CliController.php
View file @
ba4d1bb3
...
@@ -236,10 +236,13 @@ class CliController
...
@@ -236,10 +236,13 @@ class CliController
* ),
* ),
* ),
* ),
* 1 => array(
* 1 => array(
* 'option' => true,
* 'name' => 'bar',
* 'a' => 'value',
* 'args' => array(
* 'optArr' => array(
* 'option' => true,
* 'value1', 'value2'
* 'a' => 'value',
* 'optArr' => array(
* 'value1', 'value2'
* ),
* ),
* ),
* ),
* ),
* )
* )
...
...
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