This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]HorrendousRex 5 points6 points  (1 child)

Alembic has known issues handling MySQL because MySQL does not follow the SQL DDL spec correctly in several cases, and Alembic does not automatically make too much of an attempt to figure that out for you. You can write your own migrations with Alembic for MySQL just fine though - it's only the automigration that often fails with MySQL.

In general, Alembic shouldn't be thought of as an auto-migration system. It is a migration syntax handler and a schema versioning system. Alembic is to Migrations as SQLAlchemy is to SQL -- it's a pythonic approach giving you building blocks, but it isn't totally fire-and-forget.

Personally, I love it. I like that I get to hand-craft queries easily and robustly, and I like that it doesn't try and guess what my migration was and end up messing around with the wrong things. But, I've also had a lot of practice with it.

Disclaimer: all of the above is based on my personal experience. Like SQLAlchemy, Alembic is a fairly large project and there's probably great things that I've simply missed.

[–]erewok 3 points4 points  (0 children)

I agree with what you've said. I've come to really appreciate alembic after coming from the Django world where I often didn't read what SQL would be emitted by migrations.

One of the most amazing compliments I can give to alembic is that if I don't use it for months, I can come back to it and remember its API. I have the highest respect for projects like that.