Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should tenants be deleted? What about historical reporting?

Tags:

database

saas

I am creating a multi-tenant SaaS app with a shared-db, shared-schema. Here is my question: What are good policies for deleting tenants? Here are some of my thoughts...

If I delete a tenant and all its associated data:

  1. I will lose my ability to report off that data
  2. I will get rid of data that I don't need (a good thing, except for reporting)
  3. I will free up things like subdomain names that other tenants might want

Does anyone have any best practices or suggestions for this subject?

Piet

like image 871
Piet Avatar asked Jan 18 '26 16:01

Piet


1 Answers

Don't report off of production, report off of a data warehouse. Roll the warehouse over periodically into different generations, then you can purge production to match those ages.

like image 180
Roboprog Avatar answered Jan 21 '26 08:01

Roboprog



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!