---
title: NodeVersionUpgrader.UpgraderMetadata annotation
description: Use the NodeVersionUpgrader.UpgraderMetadata annotation to specify version and previousUpgrader attributes for custom node upgraders
component: pingam
version: 8.1
page_id: pingam:auth-nodes:nodeversionupgrader
canonical_url: https://docs.pingidentity.com/pingam/8.1/auth-nodes/nodeversionupgrader.html
llms_txt: https://docs.pingidentity.com/pingam/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: 2026-06-01T14:11:17Z
keywords: ["Extensibility", "Nodes &amp; Trees", "Scripts"]
section_ids:
  version: Version
  previous_upgrader: Previous Upgrader
---

# NodeVersionUpgrader.UpgraderMetadata annotation

The `NodeVersionUpgrader.UpgraderMetadata` annotation on the `upgrader` class specifies the `version` and the `previousUpgrader` attributes, both of which are required.

For example, the following is the `@NodeVersionUpgrader.UpgraderMetadata` annotation for version 2 of a Custom node:

```java
@NodeVersionUpgrader.UpgraderMetadata(version = 2, previousUpgrader = NoUpgrades.class)
```

## Version

The `version` attribute specifies the version of the new node.

## Previous Upgrader

The `previousUpgrader` attribute specifies the class name of the previous `upgrader`:

* If this annotation is for the node's first upgrader (upgrading from version 1 to version 2), set `previousUpgrader = NoUpgrades.class` to signify there isn't a previous upgrader.

* If this annotation is for a subsequent upgrader (for example, upgrading from version 2 to version 3), set `previousUpgrader` to the class name of the `upgrader` for the previous node version.

  For example, if this annotation is for an upgrade from version 2 to version 3, specify the name of the `upgrader` class for the version 2 node.
