News for hackers. Stuff that matters.
Re:Ask HN: Has anybody shipped a web app at scale with 1 DB ... by pgt on Tuesday May 26, 2020 @04:00AM (#23308520)
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.

Re:Ask HN: Has anybody shipped a web app at scale with 1 DB ... by developuh on Tuesday May 26, 2020 @11:15AM (#23312177)
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.