Skip to main content

ICkModelMigrationService

Namespace: Meshmakers.Octo.Runtime.Contracts.CkModelMigrations

Service for executing CK model migrations when upgrading between versions

public interface ICkModelMigrationService

Methods

MigrateAsync(String, CkModelId, CkModelId, CkMigrationOptions, CancellationToken)

Executes a migration from one CK model version to another for a specific tenant

Task<CkMigrationResult> MigrateAsync(string tenantId, CkModelId fromModel, CkModelId toModel, CkMigrationOptions options, CancellationToken cancellationToken)

Parameters

tenantId String
Target tenant identifier

fromModel CkModelId
Source CK model version

toModel CkModelId
Target CK model version

options CkMigrationOptions
Migration execution options

cancellationToken CancellationToken
Cancellation token

Returns

Task<CkMigrationResult>
Result of the migration execution

FindMigrationPathAsync(CkModelId, CkModelId, CancellationToken)

Finds a migration path between two CK model versions

Task<CkMigrationPath> FindMigrationPathAsync(CkModelId fromModel, CkModelId toModel, CancellationToken cancellationToken)

Parameters

fromModel CkModelId
Source CK model version

toModel CkModelId
Target CK model version

cancellationToken CancellationToken
Cancellation token

Returns

Task<CkMigrationPath>
Migration path if available, null otherwise

GetStatusAsync(String, String, CancellationToken)

Gets the current migration status for a CK model in a specific tenant

Task<CkMigrationStatus> GetStatusAsync(string tenantId, string ckModelName, CancellationToken cancellationToken)

Parameters

tenantId String
Tenant identifier

ckModelName String
Name of the CK model (e.g., "System")

cancellationToken CancellationToken
Cancellation token

Returns

Task<CkMigrationStatus>
Current migration status

GetHistoryAsync(String, String, CancellationToken)

Gets the migration history for a CK model in a specific tenant

Task<IReadOnlyList<CkMigrationHistoryEntry>> GetHistoryAsync(string tenantId, string ckModelName, CancellationToken cancellationToken)

Parameters

tenantId String
Tenant identifier

ckModelName String
Name of the CK model (e.g., "System")

cancellationToken CancellationToken
Cancellation token

Returns

Task<IReadOnlyList<CkMigrationHistoryEntry>>
List of executed migrations

ValidateAsync(String, CkModelId, CkModelId, CancellationToken)

Validates a migration without executing it

Task<CkMigrationValidationResult> ValidateAsync(string tenantId, CkModelId fromModel, CkModelId toModel, CancellationToken cancellationToken)

Parameters

tenantId String
Target tenant identifier

fromModel CkModelId
Source CK model version

toModel CkModelId
Target CK model version

cancellationToken CancellationToken
Cancellation token

Returns

Task<CkMigrationValidationResult>
Validation result