Need help with Branching - staging branch empty despite migrations in GitHub
Goal: Set up staging/production environments using Supabase Branching connected to GitHub, with Lovable pushing to staging for testing before production deployment.
Current Stack:
Lovable - App development
GitHub - Repository
Supabase - Database, Authentication, Edge Functions, etc.
Netlify: Hosting
What I've done:
Connected Supabase project to GitHub successfully (integration shows connected)
Created staging branch in GitHub
Created continuous PR: staging → main in GitHub
Manually created staging branch in Supabase (linked to GitHub staging branch)
GitHub repo has supabase/migrations/ folder with 7 migration files already (created by Lovable over time)
The problem:
Staging branch in Supabase is nearly empty - only has 1 function, no tables or other database objects from main branch. The migrations from GitHub didn't automatically apply.
What I've tried:
Toggling "Supabase changes only" off in integration settings
Making changes in supabase/ directory to trigger detection
Waiting 45+ minutes for automatic sync
GitHub integration settings show correct repo and branch configuration
Questions:
Should existing migrations automatically apply when creating a new branch linked to GitHub?
Is there a way to trigger migration application to an existing branch without PITR ($100/month)?
Am I missing a step in the GitHub integration setup that would cause migrations to run on new branches?
Using Supabase Pro. The main branch works fine with all tables/functions. Just the staging branch is empty.
Any guidance appreciated!
1 Reply
Existing migrations should automatically apply to a supabase branch. Essentially it checks if the
supabase/migrations has any changes but in your case you have one persistent branch by the looks of it. I have seen a few issues with branching lately so first i would check if your github integration is set up correctly to the right supabase folder
Essentially if your supbase folder is in apps/supabase in your repo you should point the integration to ./apps as it will detect the supabase
could you check that and maybe close your branch and reopen it again
Also depending on your region you might have been facing some issues https://discord.com/channels/839993398554656828/1409892722474614814/1422529482543337545