def METHOD_NAME(  # pylint: disable=redefined-outer-name, unused-argument
    context: MigrationContext, revision: str, directives: list[MigrationScript]
) -> None:
    if getattr(config.cmd_opts, "autogenerate", False):
        script = directives[0]
        if script.upgrade_ops.is_empty():
            directives[:] = []
            logger.info("No changes in schema detected.")