mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 19:24:02 +00:00
Purge central connection in RLS bootstrapper's bootstrap()
This commit is contained in:
parent
f859a5da06
commit
e8b3c23c72
1 changed files with 2 additions and 0 deletions
|
|
@ -33,6 +33,8 @@ class PostgresRLSBootstrapper implements TenancyBootstrapper
|
|||
|
||||
public function bootstrap(Tenant $tenant): void
|
||||
{
|
||||
$this->database->purge($this->config->get('tenancy.database.central_connection'));
|
||||
|
||||
/** @var TenantWithDatabase $tenant */
|
||||
$this->config->set('database.connections.pgsql.username', $tenant->database()->getUsername() ?? $tenant->getTenantKey());
|
||||
$this->config->set('database.connections.pgsql.password', $tenant->database()->getPassword() ?? 'password');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue