How to use the ihatemoney.models.db.engine.dialect.has_table function in ihatemoney

To help you get started, we’ve selected a few ihatemoney examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github spiral-project / ihatemoney / ihatemoney / run.py View on Github external
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
github spiral-project / ihatemoney / ihatemoney / run.py View on Github external
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