Skip to content

DmMigrationOptions ​

Namespace: MJCZone.DapperMatic.Migrations

Assembly: MJCZone.DapperMatic

Summary ​

Configures a DmMigrator.

sealed public

Contents ​

Constructors (1) | Methods (4) | Properties (11)

Constructors ​

DmMigrationOptions ​

csharp
DmMigrationOptions()

Methods ​

GetType ​

csharp
GetType()

ToString ​

csharp
ToString()

Equals ​

csharp
Equals()

GetHashCode ​

csharp
GetHashCode()

Properties ​

SchemaName ​

Gets or sets the schema the ledger table lives in. Null means the provider's default schema, resolved when the migrator runs. Ignored by providers without schemas.

Type: string?

TableStateTableName ​

Gets or sets the name of the ledger table that records each table's model fingerprint.

Type: string

CreateLedgerIfMissing ​

Gets or sets a value indicating whether the ledger table is created when it does not exist. When false, a missing ledger is an error.

Type: bool?

UseLock ​

Gets or sets a value indicating whether instances running the migrator at the same time take turns. Leave it on unless only ever one instance migrates.

Type: bool?

LockName ​

Gets or sets the name the lock is derived from. Null derives it from the database and the ledger table, so applications with different ledgers never wait for each other.

Type: string?

LockTimeout ​

Gets or sets how long to wait for another instance to finish migrating before giving up with a TimeoutException.

Type: TimeSpan?

DeadlockRetries ​

Gets or sets how many times a run the database chose as the victim of a deadlock is run again, after a short pause. Zero throws the first deadlock.

Type: int?

ApplySafeAlterations ​

Gets or sets a value indicating whether existing columns are altered in the ways that cannot lose data: a longer length, more precision, allowing nulls. See DmColumnAlteration.

Type: bool?

ThrowOnBlocked ​

Gets or sets a value indicating whether a run that leaves any table blocked throws a DmMigrationException once its work is saved. When false, blocked tables are reported in the result and tried again on the next run.

Type: bool?

AppliedBy ​

Gets or sets who is recorded as having reconciled each table, such as a machine or user name.

Type: string?

Log ​

Gets or sets a callback that receives what the migrator does as it does it.

Type: Action<DmMigrationEvent>?