DB Migration and Development Environment
# help
DB Migration and Development Environment
**Context: **I started using Supabase's DB and API features since last month. Mostly done through Supabase Studio interface. Now that I'm more serious in using Supabase in production environment. How would go about to - Set up development and production environment, so that I develop feature fast and safely, and deploy with more confident? So I tried, to follow this guide: https://supabase.com/docs/guides/local-development It's lead to another question, how should I do migration properly? To keep dev and prod schema in sync. So far I've not come across guide that is easy enough to follow? Would love to hear you guys advice on following questions: 1. How do you setup development and production? What tools are used. 2. How do you guys keep db schema in sync between 2 envs?
Reading the "Local Development" guide one more time, it seem like my problem is to have initial db matched with the one is currently on production
Hmm, after following the guide https://supabase.com/docs/guides/database#migrating-between-projects here, I managed to clone prod env to dev-env
but not an ideal solution, as it take 2 project to handle dev/prod env
which eat up all of my free allowance, plus, in the future, it will double the cost for using supabase
I think I would love to use self-hosted supabase on my local machine, then use cloud hosted for my production
I'd love to hear you guy's solutions