1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 18:04:03 +00:00

Refactor DB config & Tenant DB managers

This commit is contained in:
Samuel Štancl 2020-05-12 03:32:28 +02:00
parent 3c4d2189dc
commit 64383b4c56
8 changed files with 51 additions and 41 deletions

View file

@ -6,13 +6,6 @@ namespace Stancl\Tenancy\Contracts;
interface TenantDatabaseManager
{
/**
* Return the config key that separates databases (e.g. 'database' or 'schema').
*
* @return string
*/
public function getSeparator(): string;
/**
* Create a database.
*/
@ -30,4 +23,13 @@ interface TenantDatabaseManager
* @return bool
*/
public function databaseExists(string $name): bool;
/**
* Make a DB connection config array.
*
* @param array $baseConfig
* @param string $databaseName
* @return array
*/
public function makeConnectionConfig(array $baseConfig, string $databaseName): array;
}