MigrationStepResult

Represents the result of executing a migration step.

This enum controls the flow of migration execution by indicating how the migration framework should proceed after a step completes. Each result type affects the migration differently:

Usage Examples:

CONTINUE - Normal progression:

step("Initialize database") {
database.initialize()
MigrationStepResult.CONTINUE
}

RERUN - Retry logic:

step("Download data") {
val success = downloadData()
if (success) {
MigrationStepResult.CONTINUE
} else {
logger.w("Download failed, retrying...")
MigrationStepResult.RERUN
}
}

ABORT - Early termination:

step("Check prerequisites") {
if (prerequisitesMet()) {
MigrationStepResult.CONTINUE
} else {
logger.i("Prerequisites not met, skipping migration")
MigrationStepResult.ABORT
}
}

Entries

Link copied to clipboard

Continue to the next step in the migration sequence. This is the normal result for successful step execution.

Link copied to clipboard

Rerun the current step without advancing to the next step. Useful for implementing retry logic when a step may fail temporarily. Be careful to avoid infinite loops by implementing proper retry limits.

Link copied to clipboard

Terminate the migration successfully without executing remaining steps. The migration is considered completed successfully. Use this when conditions indicate that further migration steps are not needed.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.