Class ExecutedMigrationPlan
Represents the state and progress of a migration plan that has been executed.
Inheritance
Namespace: Umbraco.Cms.Infrastructure.Migrations
Assembly: Umbraco.Infrastructure.dll
Syntax
public class ExecutedMigrationPlan
Constructors
View SourceExecutedMigrationPlan()
Initializes a new instance of the ExecutedMigrationPlan class, which represents a record of a completed migration plan execution.
Declaration
public ExecutedMigrationPlan()
ExecutedMigrationPlan(MigrationPlan, string, string)
Initializes a new instance of the ExecutedMigrationPlan class with the specified migration plan and its initial and final states.
Declaration
public ExecutedMigrationPlan(MigrationPlan plan, string initialState, string finalState)
Parameters
| Type | Name | Description |
|---|---|---|
| MigrationPlan | plan | The MigrationPlan that was executed. |
| string | initialState | The state of the migration plan before execution. |
| string | finalState | The state of the migration plan after execution. |
ExecutedMigrationPlan(MigrationPlan, string, string, bool, IReadOnlyList<Transition>)
Initializes a new instance of the ExecutedMigrationPlan class with the specified migration plan, states, success flag, and completed transitions.
Declaration
[SetsRequiredMembers]
public ExecutedMigrationPlan(MigrationPlan plan, string initialState, string finalState, bool successful, IReadOnlyList<MigrationPlan.Transition> completedTransitions)
Parameters
| Type | Name | Description |
|---|---|---|
| MigrationPlan | plan | The migration plan that was executed. |
| string | initialState | The state before the migration was executed. |
| string | finalState | The state after the migration was executed. |
| bool | successful | True if the migration execution was successful; otherwise, false. |
| IReadOnlyList<MigrationPlan.Transition> | completedTransitions | The transitions that were completed during the migration execution. |
Properties
View SourceCompletedTransitions
A collection of all the succeeded transition.
Declaration
public required IReadOnlyList<MigrationPlan.Transition> CompletedTransitions { get; init; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<MigrationPlan.Transition> |
Exception
The exception that caused the plan to fail.
Declaration
public Exception? Exception { get; init; }
Property Value
| Type | Description |
|---|---|
| Exception |
FinalState
The final state after the migrations has ran.
Declaration
public required string FinalState { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
InitialState
The initial state the plan started from, is null if the plan started from the beginning.
Declaration
public required string InitialState { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
Plan
The Migration plan itself.
Declaration
public required MigrationPlan Plan { get; init; }
Property Value
| Type | Description |
|---|---|
| MigrationPlan |
Successful
Determines if the migration plan was a success, that is that all migrations ran successfully.
Declaration
public required bool Successful { get; init; }
Property Value
| Type | Description |
|---|---|
| bool |