mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 20:54:04 +00:00
Add support for postgres schema (#237)
* Add support for postgres schema * wip * Apply fixes from StyleCI * revert to db as default for pgsql * Move separate_by to database * Fixing testing * Fixing style * Reverted change * Store string instead of Connection instance * Remove use statement * Add use statement for DB facade * mysql -> pgsql Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
This commit is contained in:
parent
e02bd3927a
commit
d0023c482a
6 changed files with 221 additions and 2 deletions
|
|
@ -30,6 +30,7 @@ return [
|
|||
'based_on' => null, // The connection that will be used as a base for the dynamically created tenant connection. Set to null to use the default connection.
|
||||
'prefix' => 'tenant',
|
||||
'suffix' => '',
|
||||
'separate_by' => 'database', // database or schema (only supported by pgsql)
|
||||
],
|
||||
'redis' => [
|
||||
'prefix_base' => 'tenant',
|
||||
|
|
@ -61,6 +62,7 @@ return [
|
|||
'sqlite' => Stancl\Tenancy\TenantDatabaseManagers\SQLiteDatabaseManager::class,
|
||||
'mysql' => Stancl\Tenancy\TenantDatabaseManagers\MySQLDatabaseManager::class,
|
||||
'pgsql' => Stancl\Tenancy\TenantDatabaseManagers\PostgreSQLDatabaseManager::class,
|
||||
// 'pgsql' => Stancl\Tenancy\TenantDatabaseManagers\PostgreSQLSchemaManager::class, // Separate by schema instead of database
|
||||
],
|
||||
'database_manager_connections' => [
|
||||
// Connections used by TenantDatabaseManagers. This tells, for example, the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue