MigrationGenerator class Null safety

Recreate existing migrations as manageable objects. Eventually used in SchemaDifference to generate new Migrations

Inheritance

Constructors

MigrationGenerator()
const

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

expandAllMigrations(LibraryReader library) Iterable<Migration>
Search library for all classes that extend Migration. 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
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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.