4 ms·
On more than one occasion I've started with a simple table for all tenants (where tenant = x) because we didn't know at the time if we will have many. Then pro
by hackerm0nkey 6y ago
On more than one occasion I've started with a simple table for all tenants (where tenant = x) because we didn't know at the time if we will have many.
Then progressively when we understood how the service will be used, refactored to keep separate tenant's data separate.
Ended up with each tenant in a given schema, we were using Java and relied on Hibernate (ORM) to help connecting to the correct DB (it does support multi-tenancy) as well as on a DB migration tool (Liquibase) so any changes we made to the schema get replicated over all tenants.