play nice with Flask-SqlAlchemy