Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _pre_alembic_db():
""" Checks if we are migrating from a pre-alembic ihatemoney
"""
con = db.engine.connect()
tables_exist = db.engine.dialect.has_table(con, "project")
alembic_setup = db.engine.dialect.has_table(con, "alembic_version")
return tables_exist and not alembic_setup