Skip to main content

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

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)

Metadata

Release files for amigrations 0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for amigrations 0.5
File Size Uploaded Provenance
amigrations-0.5.tar.gz 6.4 kB Without provenance Details

Release files / amigrations-0.5.tar.gz

Download URL amigrations-0.5.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a0c9506bc74df029cb9d7cd0136dd7b165f256c8fa673a743deeeeecedb81959
BLAKE2b-256 checksum
How to use checksums
0aa00900a33c38402e82d0aad1462e9a7ce09ddabe70b6889ac3aea4497509ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for amigrations 0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.5 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page