mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 09:34:05 +00:00
Update PostgreSQLSchemaManager to set correct config key value
This commit is contained in:
parent
f065ea60b0
commit
1b252935bb
1 changed files with 3 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||
namespace Stancl\Tenancy\TenantDatabaseManagers;
|
||||
|
||||
use Illuminate\Database\Connection;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Stancl\Tenancy\Contracts\TenantDatabaseManager;
|
||||
use Stancl\Tenancy\Contracts\TenantWithDatabase;
|
||||
|
|
@ -46,7 +47,8 @@ class PostgreSQLSchemaManager implements TenantDatabaseManager
|
|||
|
||||
public function makeConnectionConfig(array $baseConfig, string $databaseName): array
|
||||
{
|
||||
$baseConfig['schema'] = $databaseName;
|
||||
Arr::has($baseConfig, 'search_path') ? $baseConfig['search_path'] = $databaseName : null;
|
||||
Arr::has($baseConfig, 'schema') ? $baseConfig['schema'] = $databaseName : null;
|
||||
|
||||
return $baseConfig;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue