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:
parent
3c4d2189dc
commit
64383b4c56
8 changed files with 51 additions and 41 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue