MigrationGenerator class
Recreate existing migrations as manageable objects.
Eventually used in SchemaDifference
to generate new Migration
s
Constructors
- MigrationGenerator()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
expandAllMigrations(
LibraryReader library) → Iterable< Migration> -
Search
library
for all classes that extendMigration
. Recreate these in Dart Code -
generate(
LibraryReader library, BuildStep? buildStep, {Schema? newSchema, int? version}) → String? - Creates a new migration from the delta between the existing migration and a new schema
-
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
Static Properties
- emptySchema → Schema
-
final
Static Methods
-
allMigrationsByFilePath(
LibraryReader library) → Map< String, String> - Find all annotated migrations and bundle them with their source path. Useful for generating an import or list of all migrations.