migration to flask-sqlalchemy (I)