SqliteMigrationApplier

Classes > Nimblesite.DataProvider.Migration.SQLite > SqliteMigrationApplier

Applies migration operations to SQLite. Constraint changes SQLite cannot ALTER (nullability, foreign keys, checks, unique constraints, dropped columns) are replaced by one `` per table, placed before any other operation on that table. Implements [MIG-SQLITE-REBUILD].

public static class SqliteMigrationApplier

Methods

Apply(SqliteConnection, SchemaDefinition, IReadOnlyList<SchemaOperation>, MigrationOptions, ILogger?)

public static Result<bool, MigrationError> Apply(SqliteConnection connection, SchemaDefinition desired, IReadOnlyList<SchemaOperation> operations, MigrationOptions options, ILogger? logger = null)

Plan table rebuilds, then apply the operations. Foreign keys are turned off while rebuilding and foreign keys are checked before committing.

Parameters:

Name Type Description
connection SqliteConnection
desired SchemaDefinition
operations SchemaOperation>
options MigrationOptions
logger ILogger

Returns: MigrationError>