Migration class abstract
One reversible schema change. Subclass it, implement up and down,
and hand instances to a Migrator in the order they should run.
class CreateUsersTable extends Migration {
@override
Future<void> up(SchemaBuilder schema) => schema.create('users', (t) {
t.id();
t.string('email').unique();
t.timestamps();
});
@override
Future<void> down(SchemaBuilder schema) => schema.dropIfExists('users');
}
Constructors
Properties
Methods
-
down(
SchemaBuilder schema) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
up(
SchemaBuilder schema) → Future< void>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited