def METHOD_NAME(run_cli_command, monkeypatch):
    """Test `verdi status` when storage schema version is incompatible with that of the code."""
    def storage_cls(*args, **kwargs):  # pylint: disable=unused-argument
        from aiida.common.exceptions import IncompatibleStorageSchema
        raise IncompatibleStorageSchema()
    monkeypatch.setattr(migrator.PsqlDosMigrator, 'validate_storage', storage_cls)
    result = run_cli_command(cmd_status.verdi_status, raises=True, use_subprocess=False)
    assert 'verdi storage migrate' in result.output
    assert result.exit_code is ExitCode.CRITICAL