This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This Flask extension provides a configurable Alembic migration environment around a Flask-SQLAlchemy database.

This code was originally forked from Flask-Alembic and updated to work with Alembic > 0.7. Huge thanks to davidism for his work there.

Requirements

  • python >= 3.3
  • alembic >= 0.7
  • flask >= 0.10
  • flask-sqlalchemy

Installation

This package can be installed using pip:

pip install flask-moves

Usage

Here’s a quick teaser of what you can do with flask-moves:

from flask_moves import Alembic

# Intialize the extension
alembic = Alembic()
alembic.init_app(app)

# Auto-generate a migration
alembic.revision('making changes')

# Upgrade the database
alembic.upgrade()

# Access the internals
environment_context = alembic.env

Commands are included for Click and Flask-Script:

$ ./manage.py db revision "making changes"
$ ./manage.py db upgrade

Setting up Flask-Script:

from flask_moves.cli.script import manager as alembic_manager
manager.add_command('db', alembic_manager)

Setting up Click:

from flask_moves.cli.click import cli as alembic_cli
app.cli.add_command(alembic_cli, 'db')

Differences from Alembic Core

  • Configuration is taken from Flask instead of alembic.ini.
  • The migrations are stored directly in the migrations folder instead of the versions folder.
  • The extension provides the migration environment instead of env.py.
  • Does not (currently) support offline migrations.

Feedback

This package is immature. If you have any comments, suggestions, feedback, or issues, please feel free to send me a message or submit an issue on Github.

Release History

Release History

0.0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
flask_moves-0.0.2-py2-none-any.whl (9.9 kB) Copy SHA256 Checksum SHA256 2.7 Wheel May 4, 2016
flask_moves-0.0.2-py3-none-any.whl (9.9 kB) Copy SHA256 Checksum SHA256 3.5 Wheel May 4, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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