def drop(): """ Drops database tables """ if prompt_bool("Are you sure you want to lose all your data"): db.drop_all()
def teardown_db(): """Method used to destroy a database""" db.session.remove() db.drop_all() db.session.bind.dispose()
def db(app): _db.app = app _db.create_all() yield _db _db.drop_all()