@manager.command
def deploy():
 from flask_migrate import upgrade
 from app.models import Role, User
 upgrade()
 Role.insert_roles()
 User.add_self_follows()

@ manager . command def deploy ( ) : from flask_migrate import upgrade from app . models import Role , User upgrade ( ) Role . insert_roles ( ) User . add_self_follows ( )
deploy latest environment and code and restart backends .