mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
Document pgsql schema separation fix #45
This commit is contained in:
parent
0e8a9a7ac9
commit
ff8b594cbd
2 changed files with 17 additions and 1 deletions
|
|
@ -79,7 +79,8 @@ return [
|
||||||
'Tenants' => 'tenants',
|
'Tenants' => 'tenants',
|
||||||
'Central App' => 'central-app',
|
'Central App' => 'central-app',
|
||||||
'Universal Routes' => 'universal-routes',
|
'Universal Routes' => 'universal-routes',
|
||||||
'Cacheed Tenant Lookup' => 'cached-tenant-lookup',
|
'Cached Tenant Lookup' => 'cached-tenant-lookup',
|
||||||
|
'PostgreSQL schema separation' => 'postgres-schema-separation',
|
||||||
'Custom Database Names' => 'custom-database-names',
|
'Custom Database Names' => 'custom-database-names',
|
||||||
'Custom DB Connections' => 'custom-db-connections',
|
'Custom DB Connections' => 'custom-db-connections',
|
||||||
'Disabling DB Creation' => 'disabling-db-creation',
|
'Disabling DB Creation' => 'disabling-db-creation',
|
||||||
|
|
|
||||||
15
docs/source/v2/postgres-schema-separation.blade.md
Normal file
15
docs/source/v2/postgres-schema-separation.blade.md
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
title: PostgreSQL schema separation
|
||||||
|
description: PostgreSQL schema separation
|
||||||
|
extends: _layouts.documentation
|
||||||
|
section: content
|
||||||
|
---
|
||||||
|
|
||||||
|
# PostgreSQL schema separation {#postgresql-schema-separation}
|
||||||
|
|
||||||
|
If you're using PostgreSQL, you can separate tenant databases by *schemas* instead of *databases*.
|
||||||
|
|
||||||
|
To enable this, set the config like this:
|
||||||
|
|
||||||
|
- `tenancy.database.separate_by`: `'schema'` to tell the package how we're separating databases
|
||||||
|
- `tenancy.database_managers.pgsql`: `Stancl\Tenancy\TenantDatabaseManagers\PostgreSQLSchemaManager::class` to tell the package to use the schema creator/deleter instead of database creator/deleter for pgsql databases.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue