Migration.diff constructor
Migration.diff(
- String id, {
- required SqlDialect dialect,
- required SchemaSnapshot from,
- required SchemaSnapshot to,
- SchemaRenames renames = const SchemaRenames(),
- String? previous,
- bool allowDestructive = false,
- Map<
String, Map< using = const {},String, String> >
Plans the transition from from to to, without applying any changes.
Renames must be explicit in renames. Potential data loss requires
allowDestructive; using supplies reviewed conversion SQL by table and
column. Review the returned steps before adding the plan to a history.
Implementation
factory Migration.diff(
String id, {
required SqlDialect dialect,
required SchemaSnapshot from,
required SchemaSnapshot to,
SchemaRenames renames = const SchemaRenames(),
String? previous,
bool allowDestructive = false,
Map<String, Map<String, String>> using = const {},
}) => diffSchema(
id,
dialect: dialect,
from: from.forDialect(dialect),
to: to.forDialect(dialect),
renames: renames,
previous: previous,
allowDestructive: allowDestructive,
using: using,
);