mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 11:34:03 +00:00
Syncing: SyncedResourceDeleted event and DeleteResourceMapping listener
Also move pivot record deletion to that listener and improve tests The 'tenant pivot records are deleted along with the tenants to which they belong to' test is failing in this commit -- the listener for deleting mappings when a *tenant* is deleted is only implemented in the next commit. The only change done here is to re-add FKs (necessary for passing *in this commit* in that specific dataset variant) that were removed from the default test migration as we now have the DeleteResourceMapping listener that's enabled by default.
This commit is contained in:
parent
45cf7029af
commit
44e8ec8abf
10 changed files with 160 additions and 20 deletions
|
|
@ -129,6 +129,9 @@ class TenancyServiceProvider extends ServiceProvider
|
|||
ResourceSyncing\Events\SyncedResourceSaved::class => [
|
||||
ResourceSyncing\Listeners\UpdateOrCreateSyncedResource::class,
|
||||
],
|
||||
ResourceSyncing\Events\SyncedResourceDeleted::class => [
|
||||
ResourceSyncing\Listeners\DeleteResourceMapping::class,
|
||||
],
|
||||
ResourceSyncing\Events\SyncMasterDeleted::class => [
|
||||
ResourceSyncing\Listeners\DeleteResourcesInTenants::class,
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue