Skip to content

ustudio/armus

Repository files navigation

Circle CI

Standalone Migration Tool a.k.a. "Armus"

armus logo

What is Armus?

Armus is an open source tool for running migration scripts. It was developed in an effort to simplify database migrations at uStudio.

Create Migration

Armus includes a script to generate a migration module and associated test.

Command Line Usage

-p path to migrations (defaults to "migrations")

-d description of migration i.e. add_field_to_user_table

If the migration and testing directories do not exist they will be created for you.

ex. python armus/bin/create_migration.py -d MIGRATION_DESCRIPTION

Apply migrations

The migrations.py module handles executing your migration scripts.

ex.

from armus import migrations

migrations.apply_new(PATH_TO_MIGRATIONS_PACKAGE, LIST_OF_APPLIED_MIGRATIONS, **kwargs)

Revert last

TO DO

  1. Make create-migration an easily executable script (i.e. armus create-migration --params)