def drop_db(): ''' Drop the database ''' DB.drop_all() print("Dropped database with URI: {0}"\ .format(current_app.config["SQLALCHEMY_DATABASE_URI"]))
def recreate_db(): ''' Recreates the database. ''' DB.drop_all() DB.create_all() DB.session.commit() print("Recreated Database with URI: {0}"\ .format(current_app.config["SQLALCHEMY_DATABASE_URI"]))