mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 09:04:03 +00:00
Merge 3b0c1b0988 into 37b2a91aa9
This commit is contained in:
commit
765aaa005a
1 changed files with 4 additions and 1 deletions
|
|
@ -10,7 +10,10 @@ class PostgreSQLDatabaseManager extends TenantDatabaseManager
|
|||
{
|
||||
public function createDatabase(TenantWithDatabase $tenant): bool
|
||||
{
|
||||
return $this->connection()->statement("CREATE DATABASE \"{$tenant->database()->getName()}\" WITH TEMPLATE=template0");
|
||||
$database = $tenant->database()->getName();
|
||||
$charset = strtoupper($this->connection()->getConfig('charset') ?? 'UTF8');
|
||||
|
||||
return $this->connection()->statement("CREATE DATABASE \"{$database}\" WITH TEMPLATE=template0 ENCODING='{$charset}'");
|
||||
}
|
||||
|
||||
public function deleteDatabase(TenantWithDatabase $tenant): bool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue