fix: drop Stancl multi-DB jobs from TenantCreated/Deleted (single-DB mode)
This commit is contained in:
@@ -23,31 +23,16 @@ class TenancyServiceProvider extends ServiceProvider
|
|||||||
return [
|
return [
|
||||||
// Tenant events
|
// Tenant events
|
||||||
Events\CreatingTenant::class => [],
|
Events\CreatingTenant::class => [],
|
||||||
Events\TenantCreated::class => [
|
// Single-DB mode: no per-tenant database creation/deletion.
|
||||||
JobPipeline::make([
|
// Provisioning happens in App\Services\CompanyProvisioner
|
||||||
Jobs\CreateDatabase::class,
|
// (creates roles + admin user + adds Coolify FQDN).
|
||||||
Jobs\MigrateDatabase::class,
|
Events\TenantCreated::class => [],
|
||||||
// Jobs\SeedDatabase::class,
|
|
||||||
|
|
||||||
// Your own jobs to prepare the tenant.
|
|
||||||
// Provision API keys, create S3 buckets, anything you want!
|
|
||||||
|
|
||||||
])->send(function (Events\TenantCreated $event) {
|
|
||||||
return $event->tenant;
|
|
||||||
})->shouldBeQueued(false), // `false` by default, but you probably want to make this `true` for production.
|
|
||||||
],
|
|
||||||
Events\SavingTenant::class => [],
|
Events\SavingTenant::class => [],
|
||||||
Events\TenantSaved::class => [],
|
Events\TenantSaved::class => [],
|
||||||
Events\UpdatingTenant::class => [],
|
Events\UpdatingTenant::class => [],
|
||||||
Events\TenantUpdated::class => [],
|
Events\TenantUpdated::class => [],
|
||||||
Events\DeletingTenant::class => [],
|
Events\DeletingTenant::class => [],
|
||||||
Events\TenantDeleted::class => [
|
Events\TenantDeleted::class => [],
|
||||||
JobPipeline::make([
|
|
||||||
Jobs\DeleteDatabase::class,
|
|
||||||
])->send(function (Events\TenantDeleted $event) {
|
|
||||||
return $event->tenant;
|
|
||||||
})->shouldBeQueued(false), // `false` by default, but you probably want to make this `true` for production.
|
|
||||||
],
|
|
||||||
|
|
||||||
// Domain events
|
// Domain events
|
||||||
Events\CreatingDomain::class => [],
|
Events\CreatingDomain::class => [],
|
||||||
|
|||||||
Reference in New Issue
Block a user