1
0
Fork 0
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:
lukinovec 2026-06-10 13:17:17 +02:00
parent b743720c7c
commit 34d19e94e2
6 changed files with 76 additions and 20 deletions

View file

@ -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);