Class UmbracoPlan
Represents the Umbraco CMS migration plan.
Namespace: Umbraco.Cms.Infrastructure.Migrations.Upgrade
Assembly: Umbraco.Infrastructure.dll
Syntax
public class UmbracoPlan : MigrationPlan
Constructors
View SourceUmbracoPlan(IUmbracoVersion)
Initializes a new instance of the UmbracoPlan class.
Declaration
public UmbracoPlan(IUmbracoVersion umbracoVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoVersion | umbracoVersion | The Umbraco version. |
Properties
View SourceInitialState
Gets the initial state.
Declaration
public override string InitialState { get; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
The initial state is the state when the plan has never run. By default, it is the empty string, but plans may override it if they have other ways of determining where to start from.
Methods
View SourceDefinePlan()
Defines the plan.
Declaration
protected virtual void DefinePlan()
Remarks
This is virtual for testing purposes.
GetVersionForState(string?)
Resolves the semantic version corresponding to a migration state in this plan.
Declaration
public SemVersion? GetVersionForState(string? state)
Parameters
| Type | Name | Description |
|---|---|---|
| string | state | The migration state to resolve. |
Returns
| Type | Description |
|---|---|
| SemVersion | The semantic version for the state, or |
Remarks
Walks the transition chain from InitialState and extracts version
numbers from migration type namespaces (convention: V_{major}{minor}{patch}).