Example #1
0
def drop_db():
    try:
        engine = db_session.get_engine(sqlite_fk=True)
        m.Cluster.metadata.drop_all(engine)
    except Exception as e:
        LOG.exception("Database shutdown exception: %s", e)
        return False
    return True
Example #2
0
def drop_db():
    try:
        engine = db_session.get_engine(sqlite_fk=True)
        m.Cluster.metadata.drop_all(engine)
    except Exception as e:
        LOG.exception("Database shutdown exception: %s", e)
        return False
    return True
Example #3
0
def setup_db():
    try:
        engine = db_session.get_engine(sqlite_fk=True)
        m.Cluster.metadata.create_all(engine)
    except sa.exc.OperationalError as e:
        LOG.exception("Database registration exception: %s", e)
        return False
    return True
Example #4
0
def setup_db():
    try:
        engine = db_session.get_engine(sqlite_fk=True)
        m.Cluster.metadata.create_all(engine)
    except sa.exc.OperationalError as e:
        LOG.exception("Database registration exception: %s", e)
        return False
    return True