Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can confirm, here be dragons. I did a DB per tenant for a local franchise retailer and it was the worst design mistake I ever made, which of course seemed justified at the time (different tax rules, what not), but we never managed to get off it and I spent a significant amount of time working around it, building ETL sync processes to suck everything into one big DB, and so on.

Instead of a DB per tenant, or a table per tenant, just add a TenantId column on every table from day 1.



I do both.

Have a tenant_id column in every table.

This gives me flexibility to either host each client separately or club them together.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: