Seeking advice: What is the professional standard for DB migration workflows? #37503
Unanswered
vishalkanteppa
asked this question in
Questions
Replies: 2 comments
|
Surprised this has zero replies or comments! |
0 replies
|
Hey! Your post sparked a really interesting conversation among our engineers at Pelotech. We didn't land on one definitive answer (honestly, there are more tradeoffs here than clean solutions) but I ended up writing a blog post based on their discussion that touches on all three of your questions (db diff reliability, code-first approaches, and data migrations). Hope it's useful: No Easy Answers: A Conversation About Professional DB Migration Workflows |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
My team is working to establish a robust and foolproof CI/CD workflow for our Supabase database migrations, and we'd love to get some advice and feedback from the community on best practices.
We have a setup with separate
devandprodprojects. After some research, here is the workflow we're currently using:Our Current Workflow
devproject.devproject withsupabase link --project-ref <dev-ref>.supabase migration new <migration_file_name>) and then populate it by comparing our local state against the remotedevproject (supabase db diff --linked --file <migration_file_name>).supabase db resetto tear down and rebuild our local database, ensuring the full migration history is valid.supabase db pushto ourprodproject on merge tomain.While this process works, we're wondering if it meets professional standards, or if there are potential failure points we're not seeing.
Any advice, critique of our current process, or links to established best practices would be hugely appreciated.
Thanks in advance!
All reactions