© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
4 replies
Night_Nurse

How to to migrate new local db to schema which I have in prod?

Hi all, so we have two supabase instances prod and dev. We are developing against dev at the moment. With the release of supabase CLI, it looks like it would be much easier to handle migrations via CLI instead of doing it manually.

To enable CLI usage in our project, I'm trying to migrate freshly set local db schema to what we have in dev currently. So we can start developing in local environment and then push db migrations to the dev via generated scripts.

I initialiazed a Supabase project in our repo via
supabase init
supabase init

Then I did a schema dump from dev via pg_dump, then created a blank sql migration script via
supabase migration new
supabase migration new
and put a pgdump result there.

How can I apply those scripts to my local supabase instance?

I found how to push it to remote, but not to the local
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

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Migrate DB from dev to prod projects
SupabaseSSupabase / help-and-questions
3y ago
Database webhook in prod and local
SupabaseSSupabase / help-and-questions
3mo ago
How to migrate from Digital Ocean MySQL managed DB ?
SupabaseSSupabase / help-and-questions
5mo ago
can't link db locally to prod
SupabaseSSupabase / help-and-questions
5mo ago