© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•2w ago
Michaël De Boey

How to combine 2 Supabase projects?

storageauth
Hi everyone! 👋

I'm looking for advice on combining two Supabase projects into one

- BC (target project) is the largest project, that uses RLS, uses Azure as the auth provider and doesn't use Supabase Storage
- IS (to be merged into BC) doesn't use RLS, uses the email auth provider (magic links) and uses Supabase Storage for user-uploaded images

The goal is to move all IS data into BC

I also would like to accomplish the following things:
- IS users should keep their accounts and data and shouldn't need to create a new account or lose access
- IS users must still be able to log in via magic links
- If an IS user and a BC user share the same email, I’d like to merge them into a single
auth.users
auth.users
record to avoid having duplicate accounts
- IS also has its own
users
users
table where
users.id
users.id
is a FK to
auth.users.id
auth.users.id
, so if users are merged we'd need to update those references as well

I’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
- Best practices for merging
auth.users
auth.users
(keeping magic link logins for IS, preserving Azure for BC)
- How to merge identities/user_metadata/app_metadata safely (which row to pick as canonical, what to copy/merge, ...)
- RLS gotchas: roles/claims/policies that must be transferred or adapted for imported users
- Recommended tools/approach for the storage migration when I copy IS's user image into BC storage while preserving paths/DB refs and access control

Any recommended patterns, tools or gotchas for doing this kind of merge?

Thanks in advance!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Connect to 2 different Supabase projects from the same user
SupabaseSSupabase / help-and-questions
13mo ago
Looking to sync two supabase projects
SupabaseSSupabase / help-and-questions
13mo ago
Supabase Organization & Projects Deleted
SupabaseSSupabase / help-and-questions
3w ago
how to connect one github repo to different supabase branch projects
SupabaseSSupabase / help-and-questions
5mo ago