Files
Umbraco-CMS/src/Umbraco.Infrastructure/Migrations/IMigrationPlanExecutor.cs
2023-05-10 15:23:00 +02:00

19 lines
623 B
C#

using Umbraco.Cms.Infrastructure.Migrations;
using Umbraco.Extensions;
namespace Umbraco.Cms.Core.Migrations;
public interface IMigrationPlanExecutor
{
[Obsolete("Use ExecutePlan instead.")]
string Execute(MigrationPlan plan, string fromState);
ExecutedMigrationPlan ExecutePlan(MigrationPlan plan, string fromState)
{
var state = Execute(plan, fromState);
// We have no real way of knowing whether it was successfull or not here, assume true.
return new ExecutedMigrationPlan(plan, fromState, state, true, plan.Transitions.Select(x => x.Value).WhereNotNull().ToList());
}
}