mirror of
https://github.com/archtechx/tenancy.git
synced 2026-06-21 08:24:04 +00:00
Make hardening work with all db/schema managers
Previously, hardening only worked with databases, not with schemas. Also test that hardening works with all relevant db managers.
This commit is contained in:
parent
b743720c7c
commit
34d19e94e2
6 changed files with 76 additions and 20 deletions
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||
namespace Stancl\Tenancy\Database\TenantDatabaseManagers;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Database\Connection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use InvalidArgumentException;
|
||||
use PDO;
|
||||
|
|
@ -149,6 +150,11 @@ class SQLiteDatabaseManager implements TenantDatabaseManager
|
|||
return $baseConfig;
|
||||
}
|
||||
|
||||
public function getCurrentDatabaseName(Connection $connection): string
|
||||
{
|
||||
return $connection->getDatabaseName();
|
||||
}
|
||||
|
||||
public function getPath(string $name): string
|
||||
{
|
||||
$this->validateDatabaseName($name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue