SqliteSchemaForge class final

Declarative schema migrator: diff a target Schema against a live database, then apply the resulting MigrationPlan.

Constructors

SqliteSchemaForge()

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

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 Methods

applyPlan({required DatabaseExecutor db, required MigrationPlan plan, bool allowDestructive = false}) → Future<MigrationResult>
Executes a MigrationPlan against the DB without touching PRAGMA user_version. Used by global/multi-storage migrators.
enableForeignKeys(DatabaseExecutor db) → Future<void>
Enables Foreign Keys on SQLite Connection
migrate({required DatabaseExecutor db, required Schema targetSchema, MigrationCallback? onUpgrade, MigrationCallback? onDowngrade, bool allowDestructive = false}) → Future<MigrationResult>
Standard standalone entrypoint (uses applyPlan + updates PRAGMA user_version)
plan({required DatabaseExecutor db, required Schema targetSchema}) → Future<MigrationPlan>
Inspects live DB structure against targetSchema and returns proposed SQL steps WITHOUT executing any mutations on the database.