ข้ามไปยังเนื้อหา

Class DatabaseMigrationDescriptor

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

Namespace: Cephalon.Abstractions.Data
Assembly: Cephalon.Abstractions.dll

Describes one logical database-migration target visible to the active Cephalon runtime.

public sealed class DatabaseMigrationDescriptor

objectDatabaseMigrationDescriptor

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

DatabaseMigrationDescriptor(string, string, string, string, string, string, DatabaseMigrationStatus, bool, bool, string?, string?, string?, DateTimeOffset?, DateTimeOffset?, string?, IReadOnlyList<DatabaseMigrationCommandDescriptor>?, IReadOnlyDictionary<string, string>?, int?, HealthState?, string?, string?, string?, DateTimeOffset?)

Section titled “ DatabaseMigrationDescriptor(string, string, string, string, string, string, DatabaseMigrationStatus, bool, bool, string?, string?, string?, DateTimeOffset?, DateTimeOffset?, string?, IReadOnlyList<DatabaseMigrationCommandDescriptor>?, IReadOnlyDictionary<string, string>?, int?, HealthState?, string?, string?, string?, DateTimeOffset?)”

Creates a new database-migration descriptor.

public DatabaseMigrationDescriptor(string id, string displayName, string description, string requestedRoleId, string resolvedRoleId, string executionMode, DatabaseMigrationStatus status, bool applyOnStartup, bool exitAfterApply, string? provider = null, string? dbContextType = null, string? mechanism = null, DateTimeOffset? startedAtUtc = null, DateTimeOffset? completedAtUtc = null, string? lastError = null, IReadOnlyList<DatabaseMigrationCommandDescriptor>? commands = null, IReadOnlyDictionary<string, string>? metadata = null, int? recommendedExecutionOrder = null, HealthState? roleHealthState = null, string? roleHealthDescription = null, string? roleMigrationState = null, string? roleMigrationDescription = null, DateTimeOffset? roleObservedAtUtc = null)

id string

The stable logical migration-target identifier.

displayName string

The operator-facing migration-target name.

description string

The human-readable migration-target description.

requestedRoleId string

The logical database role requested by migration policy.

resolvedRoleId string

The concrete database role that backs the target.

executionMode string

The execution mode such as startup-hosted-service or manual-or-deploy-time.

status DatabaseMigrationStatus

The current execution status of the migration target.

applyOnStartup bool

Whether startup execution is enabled for this target.

exitAfterApply bool

Whether the host exits after startup execution completes.

provider string?

The effective provider identifier when known.

dbContextType string?

The DbContext type that can execute the target when known.

mechanism string?

The execution mechanism such as migrate or ensure-created.

startedAtUtc DateTimeOffset?

The latest start time observed for this target.

completedAtUtc DateTimeOffset?

The latest completion time observed for this target.

lastError string?

The latest error observed for this target.

commands IReadOnlyList<DatabaseMigrationCommandDescriptor>?

Optional operator-facing command templates for executing this target outside startup apply.

metadata IReadOnlyDictionary<string, string>?

Optional operator-facing metadata associated with the migration target.

recommendedExecutionOrder int?

An optional positive ordinal that operator surfaces can use when presenting a recommended migration sequence.

roleHealthState HealthState?

The current runtime health state reported for the resolved role behind this target, when available.

roleHealthDescription string?

The operator-facing health description reported for the resolved role behind this target, when available.

roleMigrationState string?

The current migration execution state reported for the resolved role behind this target, when available.

roleMigrationDescription string?

The operator-facing migration description reported for the resolved role behind this target, when available.

roleObservedAtUtc DateTimeOffset?

The UTC timestamp when resolved-role runtime state was last observed for this target, when available.

Gets a value indicating whether startup execution is enabled for this target.

public bool ApplyOnStartup { get; }

bool

Gets optional operator-facing command templates for executing this target outside startup apply.

public IReadOnlyList<DatabaseMigrationCommandDescriptor> Commands { get; }

IReadOnlyList<DatabaseMigrationCommandDescriptor>

Gets the latest completion time observed for this target.

public DateTimeOffset? CompletedAtUtc { get; }

DateTimeOffset?

Gets the DbContext type that can execute the target when known.

public string? DbContextType { get; }

string?

Gets the human-readable migration-target description.

public string Description { get; }

string

Gets the operator-facing migration-target name.

public string DisplayName { get; }

string

Gets the runtime execution mode for this target.

public string ExecutionMode { get; }

string

Gets a value indicating whether the host exits after startup execution completes.

public bool ExitAfterApply { get; }

bool

Gets the stable logical migration-target identifier.

public string Id { get; }

string

Gets the latest error observed for this target.

public string? LastError { get; }

string?

Gets the execution mechanism such as migrate or ensure-created.

public string? Mechanism { get; }

string?

Gets optional operator-facing metadata associated with the migration target.

public IReadOnlyDictionary<string, string> Metadata { get; }

IReadOnlyDictionary<string, string>

Gets the effective provider identifier when known.

public string? Provider { get; }

string?

Gets the recommended positive ordinal for operator-facing migration playbooks when the provider can publish one.

public int? RecommendedExecutionOrder { get; }

int?

Gets the logical database role requested by migration policy.

public string RequestedRoleId { get; }

string

Gets the concrete database role that backs the target.

public string ResolvedRoleId { get; }

string

Gets the operator-facing health description reported for the resolved role behind this target, when available.

public string? RoleHealthDescription { get; }

string?

Gets the current runtime health state reported for the resolved role behind this target, when available.

public HealthState? RoleHealthState { get; }

HealthState?

Gets the operator-facing migration description reported for the resolved role behind this target, when available.

public string? RoleMigrationDescription { get; }

string?

Gets the current migration execution state reported for the resolved role behind this target, when available.

public string? RoleMigrationState { get; }

string?

Gets the UTC timestamp when resolved-role runtime state was last observed for this target, when available.

public DateTimeOffset? RoleObservedAtUtc { get; }

DateTimeOffset?

Gets the latest start time observed for this target.

public DateTimeOffset? StartedAtUtc { get; }

DateTimeOffset?

Gets the current execution status of the migration target.

public DatabaseMigrationStatus Status { get; }

DatabaseMigrationStatus