mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 08:24:04 +00:00
Add Tenant migrations section
This commit is contained in:
parent
893f664934
commit
9b521f6487
1 changed files with 6 additions and 0 deletions
|
|
@ -164,6 +164,8 @@ You can use the `tenancy()` and `tenant()` helpers to resolve `Stancl\Tenancy\Te
|
|||
]
|
||||
```
|
||||
|
||||
When you create a new tenant, [tenant migrations](#tenant-migrations) will automatically be executed for that tenant.
|
||||
|
||||
### Starting a session as a tenant
|
||||
|
||||
This runs `TenantManager::bootstrap()` which switches the DB connection, prefixes Redis, changes filesystem root paths, etc.
|
||||
|
|
@ -357,6 +359,10 @@ Listing all tenants.
|
|||
|
||||
- You may specify the tenant(s) UUIDs using the `--tenants` option.
|
||||
|
||||
### Tenant migrations
|
||||
|
||||
Tenant migrations are located in `database/migrations/tenant`, so you should move your tenant migrations there.
|
||||
|
||||
## Some tips
|
||||
|
||||
- If you create a tenant using the interactive console (`artisan tinker`) and use sqlite, you might need to change the database's permissions and/or ownership (`chmod`/`chown`) so that the web application can access it.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue