© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3mo ago•
3 replies
Rtdt

trouble creating production branch

hi all, until now i was working direct in main (production) supabase branch. But actually that was just intended as my testing environment and is also on the url testing.mydomain.com. Now i want to launch the service and create a proper production environment. So we tried to set up proper branching but got nowhere.

Here’s the case:
We have Github CI job that does the following to sync testing Subapase database and production. Testing contains the structure, production is newly create branch (no data):
•⁠ ⁠supabase link --project-ref $SUPABASE_PRODUCTION_PROJECT
•⁠ ⁠⁠supabase db push

the job fails the initial run of db push (against newly created Supabase branch) with error:
Remote migration versions not found in local migrations directory.
Make sure your local git repo is up-to-date. If the error persists, try repairing the migration history table:
supabase migration repair --status reverted 20250812023229 20250813052841 20250813052857 20250825084519 20250825090720 20250825110134 20250825111958

And update local migrations to match remote database:
supabase db pull
Running db pull before doesn’t help, produces another error:
The remote database's migration history does not match local files in supabase/migrations directory.

Make sure your local git repo is up-to-date. If the error persists, try repairing the migration history table:
supabase migration repair --status reverted 20250812023229
supabase migration repair --status reverted 20250813052841

Migration files are present in supabase/migrations.

continued in comment below due to max message size...
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

Staging to Production Branch
SupabaseSSupabase / help-and-questions
4mo ago
Change Branch Production Name
SupabaseSSupabase / help-and-questions
7mo ago
Create preview Branch from Production with data
SupabaseSSupabase / help-and-questions
4mo ago
Trouble creating users (Free Plan)
SupabaseSSupabase / help-and-questions
5mo ago