migrate_cli library Generate and automate
Migration commands for a project-owned Dart executable.
Pass a statically imported history to runMigrationCli. Database commands obtain their connection from MigrationConnection; inspection requests a read-only connection where the selected database supports it.
Functions
-
runMigrationCli(
List< String> arguments, {required MigrationHistory history, required String directory, SchemaSnapshot? schema, MigrationConnection? connect, SchemaRenames renames = const SchemaRenames(), Map<String, Map< using = const {}, bool json = true}) → Future<String, String> >void> -
Runs commands against a project's statically imported migration
history.
Typedefs
-
MigrationConnection
= FutureOr<
SqlDatabase< Function({required bool readOnly})Backend> > - Opens a runtime owned and closed by one migration CLI invocation.