Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

A tool for reordering alembic migrations

Project description

The ambix tool is intended to be used to clean up alembic histories. It can flatten badly branched alembic histories by using a toplogical sort. It can also delete a migration with a specific revision.


The ambix tool is able to re-write your alembic python scripts and delete them. Use mindfully, and make sure that you have used version control or some other mechanism to backup your migration folder before you use ambix.


  • Python 3.4+


Install using pip:

$ pip install ambix


To flatten alembic migrations, run the following command:

$ ambix-flatten <your-migration-directory>

To delete a specific revision, run the following command:

$ ambix-prune <your-migration-directory> <id-of-revision-to-delete>

To rebase a migration on different bases, run the following command:

$ ambix-rebase <your-migration-directory> <id-of-revision-to-rebase> <id-of-first-new-base> <id-of-second-new-base> …

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
ambix-0.3.1.tar.gz (5.9 kB) Copy SHA256 hash SHA256 Source None Aug 21, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page