forked from crunk/distribusi-verse
22 lines
494 B
Python
22 lines
494 B
Python
def deploy():
|
|
"""Run deployment of database."""
|
|
from app import create_app, db
|
|
from flask_migrate import upgrade, migrate, init, stamp
|
|
|
|
# This model is required for flask_migrate to make the table
|
|
from usermodel import User # noqa: F401
|
|
from distribusimodel import Distribusis # noqa: F401
|
|
|
|
app = create_app()
|
|
app.app_context().push()
|
|
db.create_all()
|
|
|
|
# migrate database to latest revision
|
|
init()
|
|
stamp()
|
|
migrate()
|
|
upgrade()
|
|
|
|
|
|
deploy()
|