mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
658 B
658 B
| title | description | extends | section |
|---|---|---|---|
| PostgreSQL schema separation | PostgreSQL schema separation | _layouts.documentation | content |
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 databasestenancy.database_managers.pgsql:Stancl\Tenancy\TenantDatabaseManagers\PostgreSQLSchemaManager::classto tell the package to use the schema creator/deleter instead of database creator/deleter for pgsql databases.