Export current state of DB as migrations file?
Is it possible to create a migrations.sql file from the current state of the database? If so how do I do this?
5 Replies
Hi :vmathi: Do you mean how to do a postgres backup?
Hi! Basically what I'm trying to do is create another supabase project with the exact same DB setup
I suppose I should have asked that as the first question haha
You can do that by using the migration and local env of Supabase. More informations here: https://supabase.com/docs/guides/cli/managing-environments
Managing Environments | Supabase Docs
Manage multiple environments using Database Migrations and GitHub Actions.
That's exactly what I'm looking for, thank you!
You're welcome!