How to combine 2 Supabase projects? #42186
Unanswered
MichaelDeBoey
asked this question in
Questions
Replies: 1 comment
|
Hi! I'd approach this as an identity migration plus data migration, rather than trying to merge both databases directly in one step. The most important part is handling users who already exist in both projects. Here's the approach I'd recommend:
Supabase documents migration of Auth schema data, including password hashes, but merging that data into an already populated Auth schema is a different problem and needs conflict handling. I'd strongly recommend doing a dry run with a few representative cases: an IS-only user, a BC-only user, and someone present in both. These docs are useful starting points:
I'd be happy to help think through the user-ID mapping if you can share how your application tables reference |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone! 👋
I'm looking for advice on combining two Supabase projects into one
The goal is to move all IS data into BC
I also would like to accomplish the following things:
auth.usersrecord to avoid having duplicate accountsuserstable whereusers.idis a FK toauth.users.id, so if users are merged we'd need to update those references as wellI’m aware that some level of re-authentication may be unavoidable, but I’d like to avoid recreating user accounts or breaking existing user–data relationships if possible.
I'm especially unsure about
auth.users(keeping magic link logins for IS, preserving Azure for BC)Any recommended patterns, tools or gotchas for doing this kind of merge?
Thanks in advance!
All reactions