MigrationAdapter class abstract

Constructors

MigrationAdapter()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

checkForeignKeys(DatabaseExecutor database, [Map<String, int> previousViolations = const {}]) → Future<void>
Checks that the migrations, which ran with foreign keys disabled, didn't violate them, as recommended by SQLite for schema changes. Violations which existed before the migrations, previousViolations, are ignored.
dropAllTables(DatabaseExecutor database) → Future<void>
Drops all tables and views of the database, e.g. for a destructive migration. Foreign keys are only checked once the transaction gets committed.
getForeignKeyViolations(DatabaseExecutor database) → Future<Map<String, int>>
Returns the number of foreign key violations per table, e.g. for comparing them before and after migrations with checkForeignKeys.
hasMigrationPath(int startVersion, int endVersion, List<Migration> migrations) → bool
Whether migrations migrate the database from startVersion to endVersion.
isUpgradePending(Database database, int version) → Future<bool>
Whether opening the existing database runs migrations, as its version is lower than version.
runMigrations(Database migrationDatabase, int startVersion, int endVersion, List<Migration> migrations) → Future<void>
Runs the given migrations for migrating the database schema and data.