Migration class

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.

Constructors

Migration()

Properties

currentSchema Schema
The current state of the Schema. [...]
read-only
database SchemaBuilder
Receiver for database altering operations. [...]
read / write
store PersistentStore
The PersistentStore that represents the database being migrated.
read-only
version ↔ int
read / write
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

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

Operators

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

Static Methods

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