SqlFileMigration class
A Migration implementation backed by SQL files (up.sql and down.sql).
This migration reads the SQL files synchronously at plan-build time and records the contents as raw schema mutations.
Constructors
- SqlFileMigration({required String upPath, required String downPath, Uri? baseUri})
Properties
- baseUri → Uri
-
Base URI used to resolve upPath and downPath when they are relative.
final
- downPath → String
-
Relative (or absolute) path to the
down.sqlfile.final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- upPath → String
-
Relative (or absolute) path to the
up.sqlfile.final
Methods
-
down(
SchemaBuilder schema) → void -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
plan(
MigrationDirection direction, {SchemaSnapshot? snapshot, String? defaultSchema, String? tablePrefix}) → SchemaPlan -
Builds a plan for the requested direction.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
up(
SchemaBuilder schema) → void -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited