3 ms·
strong_migrations looks like a really useful tool. Are there similar ones for languages/frameworks besides Ruby/Rails?
by misframer 9y ago
strong_migrations looks like a really useful tool. Are there similar ones for languages/frameworks besides Ruby/Rails?
- neeleshs 9y agoFor JVM languages, Flyway is quite popular (flywaydb.org) Django (python) has a builtin migration tool
- craigkerstiens 9y agoOriginal author here, thanks for sharing it. Will update the post to add it to the list of good tools.
- nblumhardt 9y agoAnother x-plat CLI option is Piggy - https://github.com/datalust/piggy https://github.com/datalust/piggy - a side-project still early days of development, but may be interesting for the lack of (e.g. JVM) dependencies. It's a self-contained binary for Win/Mac/Linux. DbUp, upon which Piggy is based, is a popular option in the .NET space: https://dbup.github.io/ https://dbup.github.io/. (Neither attempt the protections that I think strong_migrations is offering - TIL!)
- fulafel 9y agoIt works well as a command line tool, so not even restricted to JVM languages. One strong point of Flyway, besides being "just SQL", is the repeatable migrations, you can update your stored procedures, views and table documentation in the same version controlled source files without making a new copy in a new migration file for each change.
- iaabtpbtpnn 9y agoOooh I use Flyway but did not know about this feature! It solves a big problem for me, thank you for mentioning it! :)
- sandGorgon 9y agoAlembic is a standalone tool written in Python. Having spent years on rails migrations and then using Alembic, I can say that alembic is really brilliant. It behaves like git - it has a branching and merge model for Migrations (in case multiple people work on it simultaneously).
- robertlagrant 9y agoAlembic is amazing, but AFAIK only works with its author's (world-beating) ORM, SQLAlchemy. I didn't think it was a general-purpose database change tool.
- sandGorgon 9y agoWe use it standalone for our nodejs code. It does pull-in SQL alchemy, but who cares. I think what you are really asking is this - We don't autogenerate migrations from models, we write them explicitly. There is nothing even close enough in the nodejs world and we wanted to manage our dB properly. Incidentally, three other nodejs startups that I told this to, also started using Alembic for their migrations.
- aidos 9y agoYou could potentially use SQLA's ability to reflect your db to create the models either to get you started, or maybe in an automated fashion. Im sure there are loads of corner cases where it wouldn't work. We're happy users of alembic. In general we use it to do the initial grunt work and then manually edit the migrations / split into phases ourselves. For some stuff that Alembic doesn't handle very well (like check constraints) we've extended Alembic to handle those automatically in the way we like.
- LyndsySimon 9y agoI don't know Alembic well enough to know what features of SQLAlchemy it requires, but I do know that SQLAlchemy consists of quite a bit more than just the ORM features. Perhaps Alembic is using it at a lower level, and can be used with any (or no) ORM layer?
- anentropic 9y ago
- oneweekwonder 9y agojvm http://www.liquibase.org/ http://www.liquibase.org/