Soft Delete Organisations

I want to soft delete organisations rather than hard delete for auditing reasons. Can i achieve using this?
const auth = betterAuth({ organizationDeletion: { disabled: true, //to disable it altogether beforeDelete: async(data, request)=>{ // a callback to run before deleting org }, afterDelete: async(data, request)=>{ // a callback to run after deleting org } } }) Also if i disabled: true does beforeDelete and afterDelete not fire at all?
2 Replies
What a misery
What a misery5w ago
facing same issue, any solutions?
kaas
kaas5w ago
I would honestly just move it to a different table instead of doing that So like call it inactive orgs, and move the entire entry over there.

Did you find this page helpful?