mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 11:14:04 +00:00
35 lines
732 B
PHP
35 lines
732 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Stancl\Tenancy\Contracts;
|
|
|
|
interface TenantDatabaseManager
|
|
{
|
|
/**
|
|
* Create a database.
|
|
*/
|
|
public function createDatabase(TenantWithDatabase $tenant): bool;
|
|
|
|
/**
|
|
* Delete a database.
|
|
*/
|
|
public function deleteDatabase(TenantWithDatabase $tenant): bool;
|
|
|
|
/**
|
|
* Does a database exist.
|
|
*
|
|
* @param string $name
|
|
* @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;
|
|
}
|