def METHOD_NAME(notify_api, worker_id):
    assert "test_notification_api" in db.engine.url.database, "dont run tests against main db"
    # create a database for this worker thread -
    from flask import current_app
    current_app.config["SQLALCHEMY_DATABASE_URI"] += "_{}".format(worker_id)
    current_app.config["SQLALCHEMY_DATABASE_READER_URI"] += "_{}".format(worker_id)
    uri_db_writer = current_app.config["SQLALCHEMY_DATABASE_URI"]
    uri_db_reader = current_app.config["SQLALCHEMY_DATABASE_READER_URI"]
    current_app.config["SQLALCHEMY_BINDS"] = {
        "reader": uri_db_reader,
        "writer": uri_db_writer,
    }
    create_test_db(uri_db_writer)
    BASE_DIR = os.path.dirname(os.path.dirname(__file__))
    ALEMBIC_CONFIG = os.path.join(BASE_DIR, "migrations")
    config = Config(ALEMBIC_CONFIG + "/alembic.ini")
    config.set_main_option("script_location", ALEMBIC_CONFIG)
    with notify_api.app_context():
        upgrade(config, "head")
    grant_test_db(uri_db_writer, uri_db_reader)
    yield db
    db.session.remove()
    db.get_engine(notify_api).dispose()