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 |
---|---|
System.String |
Remarks
The default initial state in plans is string.Empty.
When upgrading from version 7, we want to use specific initial states that are e.g. "{init-7.9.3}", "{init-7.11.1}", etc. so we can chain the proper migrations.
This is also where we detect the current version, and reject invalid upgrades (from a tool old version, or going back in time, etc).
Methods
View SourceDefinePlan()
Defines the plan.
Declaration
protected void DefinePlan()
ThrowOnUnknownInitialState(String)
Throws an exception when the initial state is unknown.
Declaration
public override void ThrowOnUnknownInitialState(string state)
Parameters
Type | Name | Description |
---|---|---|
System.String | state |