5 ms·
Since we use a lot of Java we use Flyway. It’s got different ways to use it, one of them being straight command line- so you don’t have to be a Java shop to use
by manyxcxi 9y ago
Since we use a lot of Java we use Flyway. It’s got different ways to use it, one of them being straight command line- so you don’t have to be a Java shop to use it.
I like Flyway over some others I’ve tried (like Liquibase) because it supports straight up, plain ol’ SQL code for migrations and uses very simple file naming conventions to define versions and repeat operations.
The advantage we have being a Java shop is that we can also write our migrations in Java code, or mix and match. I’ve only ever done Java based migrations sparingly, all involved a big migration that involved sorting and sanity checking a lot of existing data.
For PHP/Laravel I’ve really liked Blueprint.
Although I like Flyway better than Liquibase, Liquibase can do a lot that Flyway can’t and is certainly worth looking at.
I like the control of migrating my DDL by hand instead of the code first approach, and then having some ORM randomly changing data on boot.
We use Spring Boot w/ Hibernate and JPA a fair bit. We always turn off the code that would have the code manipulate our DDL, and we do write a lot of queries by hand, but we still get a lot of auto-magical stuff for free.
- sancha_ 9y agoHaving used both Liquibase and Flyway, I prefer Liquibase. For what it's worth, Liquibase does support raw sql migration too: http://www.liquibase.org/documentation/index.html http://www.liquibase.org/documentation/index.html
- schalla 9y agoYes Liquibase is very flexible in how you can author changesets; it's certainly nice too that you can format it in XML, YAML, JSON, or SQL. All that said, what makes you say you prefer Liquibase to Flyway?
- sancha_ 9y agoThe main reason I prefer Liquibase over Flyway does not exist anymore, that was being able to downgrade my DB schema. It really is a new feature in Flyway and they were against it for a godly long time: https://github.com/flyway/flyway/issues/109 https://github.com/flyway/flyway/issues/109 And there is nothing in Flyway that Liquibase can't do and there is no reason to change back.