RebuildTableOperation

Classes > Nimblesite.DataProvider.Migration.Core > RebuildTableOperation

Recreate a table in place: create Table, copy CopyColumns, drop the old table, rename, then re-run DependentObjectSql (indexes and triggers). Planned by providers that cannot ALTER constraints (SQLite). Implements [MIG-SQLITE-REBUILD].

public sealed record RebuildTableOperation : SchemaOperation, IEquatable<SchemaOperation>, IEquatable<RebuildTableOperation>

Constructors

RebuildTableOperation

public RebuildTableOperation(TableDefinition Table, IReadOnlyList<string> CopyColumns, IReadOnlyList<string> DependentObjectSql, bool Destructive)

Recreate a table in place: create Table, copy CopyColumns, drop the old table, rename, then re-run DependentObjectSql (indexes and triggers). Planned by providers that cannot ALTER constraints (SQLite). Implements [MIG-SQLITE-REBUILD].

Parameter Type Description
Table TableDefinition
CopyColumns String>
DependentObjectSql String>
Destructive Boolean

Properties

Table

public TableDefinition Table { get; init; }

CopyColumns

public IReadOnlyList<string> CopyColumns { get; init; }

DependentObjectSql

public IReadOnlyList<string> DependentObjectSql { get; init; }

Destructive

public bool Destructive { get; init; }