Migration class abstract

The base class for migration instructions.

For each set of changes to a database, a subclass of Migration is created. Subclasses will override upgrade to make changes to the Schema which are translated into database operations to update a database's schema.




currentSchema Schema
The current state of the Schema.
no setter
database SchemaBuilder?
Receiver for database altering operations.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
store PersistentStore
The PersistentStore that represents the database being migrated.
no setter
version int?
getter/setter pair


downgrade() Future
Method invoked to downgrade a database from this migration version.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
seed() Future
Method invoked to seed a database's data after this migration version is upgraded to.
toString() String
A string representation of this object.
upgrade() Future
Method invoked to upgrade a database to this migration version.


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

Static Methods

sourceForSchemaUpgrade(Schema existingSchema, Schema newSchema, int version, {List<String>? changeList}) String