Class MigrationApplier
Applies automatic migration operations and records rollback metadata.
MigrationApplier
MigrationApplier applies automatic operations from a MigrationPlan.
Applied migrations write backups and a manifest under s1interop-runs/<run-id>/. The manifest is the input used by the rollback command, so callers should preserve the returned ManifestPath when they apply changes outside the CLI.
public sealed class MigrationApplier
- Inheritance
-
objectMigrationApplier
Remarks
Apply writes backups and a manifest under a project-local s1interop-runs directory rooted at the migration plan path.
Use Rollback(string) with the returned manifest path to restore an apply run.
Methods
Apply(MigrationPlan)
Applies automatic operations from a migration plan.
public MigrationApplyResult Apply(MigrationPlan plan)
Parameters
planMigrationPlanThe migration plan to apply.
Returns
- MigrationApplyResult
The apply result, including the rollback manifest and changed files.
Rollback(string)
Restores files from a migration manifest produced by Apply(MigrationPlan).
public MigrationRollbackResult Rollback(string manifestPath)
Parameters
manifestPathstringThe manifest path returned by a previous apply run.
Returns
- MigrationRollbackResult
The rollback result, including restored and removed files.