createMigration method

String? createMigration(
  1. LibraryReader library,
  2. List<SqliteFields> fieldses, {
  3. int? version,
})

Produce a migration from the difference between existing migrations and the latest schema

Implementation

String? createMigration(LibraryReader library, List<SqliteFields> fieldses, {int? version}) {
  final newSchema = _createNewSchema(library, fieldses, version: version);

  return migrationGenerator.generate(
    library,
    null,
    newSchema: newSchema,
    version: version,
  );
}