Class MigrationPlanExecutor
Inheritance
System.Object
Namespace: Umbraco.Cms.Infrastructure.Migrations
Assembly: Umbraco.Infrastructure.dll
Syntax
public class MigrationPlanExecutor : IMigrationPlanExecutor
Constructors
View SourceMigrationPlanExecutor(ICoreScopeProvider, IScopeAccessor, ILoggerFactory, IMigrationBuilder)
Declaration
public MigrationPlanExecutor(ICoreScopeProvider scopeProvider, IScopeAccessor scopeAccessor, ILoggerFactory loggerFactory, IMigrationBuilder migrationBuilder)
Parameters
Type | Name | Description |
---|---|---|
ICore |
scopeProvider | |
IScope |
scopeAccessor | |
ILogger |
loggerFactory | |
IMigration |
migrationBuilder |
MigrationPlanExecutor(ICoreScopeProvider, IScopeAccessor, ILoggerFactory, IMigrationBuilder, IUmbracoDatabaseFactory, IPublishedSnapshotService, DistributedCache)
Declaration
public MigrationPlanExecutor(ICoreScopeProvider scopeProvider, IScopeAccessor scopeAccessor, ILoggerFactory loggerFactory, IMigrationBuilder migrationBuilder, IUmbracoDatabaseFactory databaseFactory, IPublishedSnapshotService publishedSnapshotService, DistributedCache distributedCache)
Parameters
Type | Name | Description |
---|---|---|
ICore |
scopeProvider | |
IScope |
scopeAccessor | |
ILogger |
loggerFactory | |
IMigration |
migrationBuilder | |
IUmbraco |
databaseFactory | |
IPublished |
publishedSnapshotService | |
Distributed |
distributedCache |
MigrationPlanExecutor(ICoreScopeProvider, IScopeAccessor, ILoggerFactory, IMigrationBuilder, IUmbracoDatabaseFactory, IPublishedSnapshotService, DistributedCache, IKeyValueService, IServiceScopeFactory)
Declaration
public MigrationPlanExecutor(ICoreScopeProvider scopeProvider, IScopeAccessor scopeAccessor, ILoggerFactory loggerFactory, IMigrationBuilder migrationBuilder, IUmbracoDatabaseFactory databaseFactory, IPublishedSnapshotService publishedSnapshotService, DistributedCache distributedCache, IKeyValueService keyValueService, IServiceScopeFactory serviceScopeFactory)
Parameters
Type | Name | Description |
---|---|---|
ICore |
scopeProvider | |
IScope |
scopeAccessor | |
ILogger |
loggerFactory | |
IMigration |
migrationBuilder | |
IUmbraco |
databaseFactory | |
IPublished |
publishedSnapshotService | |
Distributed |
distributedCache | |
IKey |
keyValueService | |
IService |
serviceScopeFactory |
Methods
View SourceExecute(MigrationPlan, String)
Declaration
public string Execute(MigrationPlan plan, string fromState)
Parameters
Type | Name | Description |
---|---|---|
Migration |
plan | |
System. |
fromState |
Returns
Type | Description |
---|---|
System. |
ExecutePlan(MigrationPlan, String)
Executes the plan.
Declaration
public ExecutedMigrationPlan ExecutePlan(MigrationPlan plan, string fromState)
Parameters
Type | Name | Description |
---|---|---|
Migration |
plan | The migration plan to be executes. |
System. |
fromState | The state to start execution at. |
Returns
Type | Description |
---|---|
Executed |
ExecutedMigrationPlan containing information about the plan execution, such as completion state and the steps that ran. |
Remarks
Each migration in the plan, may or may not run in a scope depending on the type of plan.
A plan can complete partially, the changes of each completed migration will be saved.