Skip to main content

Ascetic database migrations. The most ease way to power your python app with raw database migrations

Project description

Ascetic Migrations

Travis CI status Coveralls status

For my personal projects I’d like to use raw sql migrations. Django for example generates ugly key names: something like: key_number


Simply run in your bash:

pip install amigrations


from amigratons import AMigrations

amigrations = AMigrations('mysql://root:123456@localhost:3306/amigrations_test', path_to_folder_with_migrations)
files_created = amigrations.create(migraiton_message)
# files_created is a dictionary with two keys: up and down. If you want immediately update migration content, please
# do following
with files_created['up'].open('w') as fpu, files_created['down'].open('w') as fpd:
    fpu.write('CREATE TABLE test (id int(11) not null AUTO_INCREMENT, PRIMARY KEY(id))')
    fpd.write('drop table test')
# run db upgrade
# please pass migration id you want to downgrade to, including

Project details

Download files

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

Files for amigrations, version 0.5
Filename, size File type Python version Upload date Hashes
Filename, size amigrations-0.5.tar.gz (6.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page