This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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

Project Description

Ascetic Migrations

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

Installation

Simply run in your bash:

pip install amigrations

Usage

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
amigrations.upgrade()
# please pass migration id you want to downgrade to, including
amigrations.downgrade_to(downgrade_to_id)
Release History

Release History

This version
History Node

0.5

History Node

0.4

History Node

0.3

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
amigrations-0.5.tar.gz (6.4 kB) Copy SHA256 Checksum SHA256 Source May 14, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting