Delete tenant should delete data
Is your feature request related to a problem? Please describe. I wanted to reset the tenant. if i delete the tenant the relations etc stayed behind
Describe the solution you'd like on tenant deletion, the rest of the data, linked to the tenant, should be deleted
Describe alternatives you've considered deleting related data "manualy"
I think it's taken care by garbage collection task.
Yeah but it's slow. I wanted to use permify for my game. If i restart the game, i would have to wait for the gc to run and this is very unconvinient.
Ah, I see your use case! But it would be tricky to do it for them as they didn't use foreign key to optimize performance. Your best bet is to add some random prefix/suffix to tenant name.
Yeah I think its the easiest way. delete the old tenant and create a new one and let the gc cleanup afterwords.
Ok i tried and it doesn't work. gc runs every 5min to test. I only habe one tenant and the tables schema_definitions, relation_tuplets, bundles get never cleaned up.
I just checked the code and it seems GC doesn't clean-up for deleted tenant but rather cleans-up based on last transaction id (like deleting records having expired tx id less than the last tx id).
So I guess not an easy workaround!
resolved: PR-1517