switching to postgres and sqlalchemy models