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
b89490a5
Commit
b89490a5
authored
May 05, 2012
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DBAL-244] Fix Schema bug
parent
04fb8f99
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
PostgreSqlSchemaManager.php
lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php
+1
-1
PostgreSqlSchemaManagerTest.php
...ts/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php
+18
-0
No files found.
lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php
View file @
b89490a5
...
...
@@ -43,7 +43,7 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
*/
public
function
getSchemaNames
()
{
$rows
=
$this
->
_conn
->
fetchAll
(
'SELECT schema_name FROM information_schema.schemata'
);
$rows
=
$this
->
_conn
->
fetchAll
(
"SELECT nspname as schema_name FROM pg_namespace WHERE nspname !~ '^pg_.*' and nspname != 'information_schema'"
);
return
array_map
(
function
(
$v
)
{
return
$v
[
'schema_name'
];
},
$rows
);
}
...
...
tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php
View file @
b89490a5
...
...
@@ -13,8 +13,14 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
public
function
tearDown
()
{
parent
::
tearDown
();
if
(
!
$this
->
_conn
)
{
return
;
}
$this
->
_conn
->
getConfiguration
()
->
setFilterSchemaAssetsExpression
(
null
);
}
/**
* @group DBAL-177
*/
...
...
@@ -26,6 +32,18 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
$this
->
assertEquals
(
array
(
$params
[
'user'
],
'public'
),
$paths
);
}
/**
* @group DBAL-244
*/
public
function
testGetSchemaNames
()
{
$names
=
$this
->
_sm
->
getSchemaNames
();
$this
->
assertInternalType
(
'array'
,
$names
);
$this
->
assertTrue
(
count
(
$names
)
>
0
);
$this
->
assertTrue
(
in_array
(
'public'
,
$names
),
"The public schema should be found."
);
}
/**
* @group DBAL-21
*/
...
...
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