MigrationOperation class final
One immutable, reviewable action. Application-authored SQL always needs approval for the exact plan containing it.
Constructors
- MigrationOperation.retainTable(String tableName)
-
Explicitly retain a previously managed table as an unmanaged table.
factory
-
MigrationOperation.sql(String sql, {String reason = 'Explicit application migration SQL', List<
Object?> parameters = const []}) -
One application-authored statement. It always requires approval.
factory
Properties
- description → String
-
Review text shown with the step.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- kind → MigrationKind
-
What this step does.
final
-
parameters
→ List<
Object?> -
A fresh copy of the statement parameters.
no setter
- requiresApproval → bool
-
Whether SchemaMigrator.apply must receive approval for the plan.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- safety → MigrationSafety
-
Whether the step can run inside SchemaMigrator.applySafe.
final
- sql → String?
-
SQL to run, or null for a bookkeeping step.
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