mirror of
https://github.com/archtechx/tenancy.git
synced 2026-06-21 22:44:04 +00:00
Add detailed tenancy references and guidelines to boost resources
This commit is contained in:
parent
c94c0cd932
commit
fde2bf0cf4
21 changed files with 1707 additions and 1 deletions
|
|
@ -0,0 +1,56 @@
|
|||
# Migrations And Commands Reference
|
||||
|
||||
Use this for tenant-aware Artisan operations.
|
||||
|
||||
## Source Files
|
||||
|
||||
- `src/Commands/*`
|
||||
- `src/Concerns/HasTenantOptions.php`
|
||||
- `src/Concerns/ExtendsLaravelCommand.php`
|
||||
- `src/Concerns/DealsWithMigrations.php`
|
||||
- `assets/config.php`
|
||||
|
||||
## Tenant Migrations
|
||||
|
||||
Defaults from `tenancy.migration_parameters`:
|
||||
|
||||
- `--force` true
|
||||
- `--path` `database/migrations/tenant`
|
||||
- `--schema-path` `database/schema/tenant-schema.dump`
|
||||
- `--realpath` true
|
||||
|
||||
Commands:
|
||||
|
||||
```bash
|
||||
php artisan tenants:migrate
|
||||
php artisan tenants:migrate --tenants=tenant-id
|
||||
php artisan tenants:migrate --skip-failing
|
||||
php artisan tenants:rollback
|
||||
php artisan tenants:migrate-fresh
|
||||
php artisan tenants:seed
|
||||
```
|
||||
|
||||
## Tenant Operations
|
||||
|
||||
```bash
|
||||
php artisan tenants:run cache:clear
|
||||
php artisan tenant:tinker
|
||||
php artisan tenants:list
|
||||
php artisan tenant:dump
|
||||
```
|
||||
|
||||
## Maintenance And Storage
|
||||
|
||||
```bash
|
||||
php artisan tenants:down
|
||||
php artisan tenants:up
|
||||
php artisan tenants:link
|
||||
php artisan tenants:link --remove
|
||||
```
|
||||
|
||||
## Rules
|
||||
|
||||
- Use tenant commands for tenant DBs; normal `migrate` is central.
|
||||
- Use `--tenants=*` to scope commands to selected tenants.
|
||||
- Use `--skip-failing` only when failures should not stop execution.
|
||||
- Use concurrent process options only after verifying tenant operations are safe in parallel.
|
||||
Loading…
Add table
Add a link
Reference in a new issue