Esempio n. 1
0
def destroy_database():
    """ Removes the schema from the database. Only useful for test cases or malicious intents. """
    engine = get_engine()

    try:
        models.unregister_models(engine)
    except Exception as e:
        print('Cannot destroy schema -- assuming already gone, continuing:', e)
Esempio n. 2
0
def destroy_database(echo=True):
    """ Removes the schema from the database. Only useful for test cases or malicious intents. """
    engine = session.get_engine(echo=echo)
    models.unregister_models(engine)