Migration class Null safety
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
Properties
- currentSchema → Schema?
-
The current state of the Schema.
read-only
- database ↔ SchemaBuilder
-
Receiver for database altering operations.
read / write
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- store → PersistentStore?
-
The PersistentStore that represents the database being migrated.
read-only
- version ↔ int?
-
read / write
Methods
-
downgrade(
) → Future - Method invoked to downgrade a database from this migration version.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
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.
inherited
-
upgrade(
) → Future - Method invoked to upgrade a database to this migration version.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited