migration to flask-sqlalchemy (IV)