cli library Generate and automate
Project commands configured with ordinary Dart and static migration history.
Define OrmConfig in orm.config.dart and pass it to runOrmCli.
Generation works offline; database commands use the explicit connection
factory and the database engine fixed by the migration history.
Classes
- MigrationHistory
- Statically imported migrations and their independently recorded fingerprints. Keep these entries in version order. checked validates before returning them.
- OrmConfig
- Project paths, frozen migration history and database connection ownership.
- SchemaRenames
- Explicit physical renames. Column maps are keyed by the final table name. Swaps and chains need separate migrations to make intermediate names explicit.
- SchemaSnapshot
- Physical schema facts saved as Dart with migrations. Storage codecs support DDL; custom domain decoding remains in the generated application client.
-
SqlDatabase<
B extends Backend> Sessions and transactions - Raw SQL execution with owned driver resources and explicit callback scopes.
Functions
Typedefs
-
MigrationConnection
= FutureOr<
SqlDatabase< Function({required bool readOnly})Backend> > - Opens a runtime owned and closed by one migration CLI invocation.