Migration constructor

Migration(
  1. int startVersion,
  2. int endVersion,
  3. Future<void> migrate(
    1. Database database
    )
)

Creates a new migration between startVersion and endVersion. migrate will be called by the database and performs the actual migration.

Implementation

Migration(this.startVersion, this.endVersion, this.migrate)
    : assert(startVersion > 0),
      assert(startVersion < endVersion);