• Reference
  • Version · 5.2.1
  • Reference guide

runOrder

Last updated: August 12, 2026

The runOrder attribute specifies whether a changeset should run before or after all other changesets, rather than running them sequentially by order in the changelog. Valid values are first and last.

runOrder is not supported in formatted SQL changelogs.

Uses

By default, when you run the update command, Liquibase runs changesets sequentially according to their order in the changelog. Changes at the top of the file are run first, and changes at the bottom are run later.

However, you may have a changeset that you always want to run at the end of a deployment. Instead of moving it to the bottom of the changelog for every database update, set runOrder to last on that changeset. This way, it executes after all other changesets regardless of its order in the changelog.

Note: runOrder is evaluated globally across the entire changelog, including all files added via include or includeAll — not within the scope of each individual included file. Reordering also happens before update-to-tag subsetting, so a runOrder: last changeset may be moved past the tag boundary and skipped.

Syntax

Note: All changelog attributes use the camelCase format.

Examples

runOrder is not supported in formatted SQL changelogs.

loading

loading

loading