Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
PSDI Army
yii2
Commits
64ef54bf
Commit
64ef54bf
authored
Dec 05, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #1435: pgsql getTableNames() should not prefix table names with schema name.
parent
2fca1e90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
Schema.php
framework/yii/db/pgsql/Schema.php
+2
-7
No files found.
framework/yii/db/pgsql/Schema.php
View file @
64ef54bf
...
@@ -156,8 +156,7 @@ class Schema extends \yii\db\Schema
...
@@ -156,8 +156,7 @@ class Schema extends \yii\db\Schema
/**
/**
* Returns all table names in the database.
* Returns all table names in the database.
* @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema.
* @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema.
* If not empty, the returned table names will be prefixed with the schema name.
* @return array all table names in the database. The names have NO schema name prefix.
* @return array all table names in the database.
*/
*/
protected
function
findTableNames
(
$schema
=
''
)
protected
function
findTableNames
(
$schema
=
''
)
{
{
...
@@ -173,11 +172,7 @@ EOD;
...
@@ -173,11 +172,7 @@ EOD;
$rows
=
$command
->
queryAll
();
$rows
=
$command
->
queryAll
();
$names
=
[];
$names
=
[];
foreach
(
$rows
as
$row
)
{
foreach
(
$rows
as
$row
)
{
if
(
$schema
===
$this
->
defaultSchema
)
{
$names
[]
=
$row
[
'table_name'
];
$names
[]
=
$row
[
'table_name'
];
}
else
{
$names
[]
=
$row
[
'table_schema'
]
.
'.'
.
$row
[
'table_name'
];
}
}
}
return
$names
;
return
$names
;
}
}
...
...
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