Managing DB evolution with Alembic

Any application evolves over time and so does the entities in the application. To start with, simple DDL scripts are written to create the DB. In each release, a new table is introduced or a current one modified. You are lucky if you can push the same version of application to all your customers. Since in real world this is not possible, soon one feels the need for managing DB for various releases of the application. While for managing code, there are excellent tools available (e.g. git, svn etc.), the same is lacking for DB management.

Alembic aims to mitigate this problem. The website introduces Alembic as:
Alembic is a lightweight database migration tool for usage with the SQLAlchemy Database Toolkit for Python.
This is slightly misleading as it also supports MySQL and pgsql. Asterisk project has started using it for managing Realtime DB tables using MySQL. Though it's still in 0.7.1 version, the progress seems to be very promising. It's very easy to use which you can see from the quickstart tutorial.


Popular posts from this blog

Complete guide to DTH setup

RO purifier maintenance

Watching Television on Computer using DVBSky S960