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