SupabaseS
Supabase3mo ago
Mel

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!
Was this page helpful?