Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from flask_migrate import flask-migrate
#...
migrate = Migrate(app, db)
@app.shell_context_processor
def make_shell_context():
return dict(db=db, User=User, Role=Role,
Permission=Permission)
@app.cli.command()
def deploy():
"""Running all of our deployment operations."""
# migrate database to latest revision
upgrade()
# create or update user roles
Role.insert_roles()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.