mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-30 21:52:59 +00:00
Adding schema support to Postgres driver (Ticket #1623)
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5085 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
f742c8f879
commit
f7e4594df7
1 changed files with 3 additions and 1 deletions
|
@ -47,6 +47,7 @@ class DboPostgres extends DboSource {
|
||||||
'login' => 'root',
|
'login' => 'root',
|
||||||
'password' => '',
|
'password' => '',
|
||||||
'database' => 'cake',
|
'database' => 'cake',
|
||||||
|
'schema' => 'public',
|
||||||
'port' => 5432,
|
'port' => 5432,
|
||||||
'encoding' => ''
|
'encoding' => ''
|
||||||
);
|
);
|
||||||
|
@ -126,7 +127,8 @@ class DboPostgres extends DboSource {
|
||||||
return $cache;
|
return $cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT table_name as name FROM INFORMATION_SCHEMA.tables WHERE table_schema = 'public';";
|
$schema = $this->config['schema'];
|
||||||
|
$sql = "SELECT table_name as name FROM INFORMATION_SCHEMA.tables WHERE table_schema = '{$schema}';";
|
||||||
$result = $this->fetchAll($sql);
|
$result = $this->fetchAll($sql);
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue