Skip to content

@vttforge/core / MigrationRunnerOptions

Interface: MigrationRunnerOptions

Properties

compatibleVersion?

readonly optional compatibleVersion?: string

Compatibility floor: worlds with a stored schemaVersion strictly older than this throw VttfError VTTF-0005 instead of running migrations. Mirrors the flags.<systemId>.compatibleMigrationVersion declaration in system.json.


isNewerVersion?

readonly optional isNewerVersion?: (next, current) => boolean

Override the semver comparator. Defaults to foundry.utils.isNewerVersion resolved at call time. Test-only injection.

Parameters

next

string

current

string

Returns

boolean


logger?

readonly optional logger?: MigrationLogger

Override the logger. Defaults to a console + ui.notifications adapter. Test-only injection.


migrations

readonly migrations: readonly Migration[]

Migrations in ascending version order. Empty array is allowed (run() is a no-op then).


settingKey?

readonly optional settingKey?: string

Settings key under systemId. Defaults to 'schemaVersion'.


settings?

readonly optional settings?: GameSettingsApi

Override game.settings. Defaults to globalThis.game.settings resolved at call time. Test-only injection.


systemId

readonly systemId: string

System id, used as the game.settings namespace.

MIT licensed.