def db(request, app): with app.app_context(): _database.create_all() @request.addfinalizer def _drop(): with app.app_context(): _database.drop_all()
def createdb(): db.create_all() generic_db.create_all()