Re:Multi-Tenant Architectures
by tappleby on Sunday August 30, 2020 @10:39PM
(#24328036)
Are there any strategies for migrating from a separate db per tenant to shared db with scoped tenant_id? In this case each tenant would have overlapping primary keys.
[ Parent
| on HN ]
you add the tenantId to each table and you add it to the primary key of the table too. then you just merge.
Re:Multi-Tenant Architectures
by iovrthoughtthis on Monday August 31, 2020 @05:39AM
(#24329788)
“Just”. Depends on the number of tenants and how divergent they are.
I would incrementally bring tenants together into a single DB.