News for hackers. Stuff that matters.
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.
Re:Multi-Tenant Architectures by pegas1 on Sunday August 30, 2020 @10:57PM (#24328117)
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.

Re:Multi-Tenant Architectures by tappleby on Monday August 31, 2020 @10:43PM (#24338055)
There are also some limitations if using something like rails / activerecord which doesn't support composite primary keys natively