Wednesday, October 30, 2019

Ask HN: How do you organize and manage database migrations?

Ask HN: How do you organize and manage database migrations?
2 points by anonfunction 9 minutes ago | hide | past | web | favorite | discuss
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 all needing slight 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[1] and liquibase[2] but both are not completely free and seem proprietary. Does anyone know of another system that could help manage database schema versioning and migrations?

Thanks so much HN, this is something that I have been struggling with.

1: https://flywaydb.org/

2: https://ift.tt/2o6cNlU




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact



from Hacker News https://ift.tt/3321i2T

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.