TableMigration<T extends Model> class
Represents a single migration operation for a table.
Properties:
table: The table this migration applies totargetVersion: Database version when this migration should be applieddescription: Human-readable description for loggingmigrate: Async function that performs the migrationpriority: Execution order within the same version (lower = earlier)
Constructors
-
TableMigration({required Table<
T> table, required int targetVersion, required String description, required Future<void> migrate(PhormDatabaseExecutor db, Table<Model> table), int priority = 0}) - Creates a migration definition.
Properties
- description → String
-
Human-readable description shown in logs.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
migrate
→ Future<
void> Function(PhormDatabaseExecutor db, Table<Model> table) -
Async function that performs the migration.
final
- priority → int
-
Execution order within the same version (lower runs earlier).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
table
→ Table<
T> -
The table this migration applies to.
final
- targetVersion → int
-
Schema version this migration upgrades to.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited