Skip to main content

ICkMigrationContentProvider

Namespace: Meshmakers.Octo.Runtime.Contracts.CkModelMigrations

Provides migration content for CK models. This abstraction allows migrations to be loaded from different sources such as file system, embedded resources, or remote storage.

public interface ICkMigrationContentProvider

Methods

GetMigrationsAsync(CkModelId, CancellationToken)

Gets all available migrations for a specific CK model.

Task<IReadOnlyList<CkMigrationScriptDto>> GetMigrationsAsync(CkModelId ckModelId, CancellationToken cancellationToken)

Parameters

ckModelId CkModelId
The CK model ID to get migrations for

cancellationToken CancellationToken
Cancellation token

Returns

Task<IReadOnlyList<CkMigrationScriptDto>>
List of parsed migration scripts, ordered by source version

GetMigrationMetaAsync(CkModelId, CancellationToken)

Gets the migration metadata for a specific CK model.

Task<CkMigrationMetaDto> GetMigrationMetaAsync(CkModelId ckModelId, CancellationToken cancellationToken)

Parameters

ckModelId CkModelId
The CK model ID to get metadata for

cancellationToken CancellationToken
Cancellation token

Returns

Task<CkMigrationMetaDto>
Migration metadata or null if not found

GetMigrationAsync(CkModelId, String, String, CancellationToken)

Gets a specific migration script by source and target version.

Task<CkMigrationScriptDto> GetMigrationAsync(CkModelId ckModelId, string sourceVersion, string targetVersion, CancellationToken cancellationToken)

Parameters

ckModelId CkModelId
The CK model ID

sourceVersion String
Source version of the migration

targetVersion String
Target version of the migration

cancellationToken CancellationToken
Cancellation token

Returns

Task<CkMigrationScriptDto>
Parsed migration script or null if not found

HasMigrationsAsync(CkModelId, CancellationToken)

Checks if migrations are available for a specific CK model.

Task<bool> HasMigrationsAsync(CkModelId ckModelId, CancellationToken cancellationToken)

Parameters

ckModelId CkModelId
The CK model ID

cancellationToken CancellationToken
Cancellation token

Returns

Task<Boolean>
True if migrations exist for the model