| ||Ask HN: How do you organize and manage database migrations?|
81 points by anonfunction 5 months ago | hide | past | web | favorite | 60 comments |
|When building services that rely on relational databases, in my case postgres, what are some best practices and tools to help manage schema changes?|
We've been using migrations and doing it all manually but it's become a bottleneck and a little bit of a nightmare with multiple consumers of the database needing to make schema changes.
Another concern is multiple environments, from local development to staging and production. We're using docker-compose for local development which runs the entire "full" schema and then I'm manually applying the migration files to staging and production before we deploy.
I've looked at some projects like flywaydb and liquibase but both are not completely free and seem proprietary. Does anyone know of another open source system that could help manage database schema versioning and migrations?
Thanks so much HN, this is something that I have been struggling with.
| Apply to YC