sqflite_migration_plan library

Flexible migrations for sqflite databases

A MigrationPlan will be the starting point in common usage.

Classes

Migration
A discrete (and possibly reversible) database change.
MigrationPlan
A roadmap of operations which cumulatively describe how a database is migrated (upgraded or downgraded) from any version to any version.
Operation<T>
An operation op along with its associated errorStrategy.

Enums

MigrationErrorStrategy
Enumerates the ways in which exceptions in an Operation should be handled during the course of upgrade or downgrade.

Properties

noop OperationFn<void>
A no-operation, simply immediately returning a Future to null.
getter/setter pair

Typedefs

OperationFn<T> = Future<T> Function(Database db)
A function accepting a Database and returning a Future; an Operation is built from such functions.

Exceptions / Errors

DatabaseMigrationException
An error encountered while calling in the course of an upgrade or downgrade.