MigrationDescriptor.fromJson constructor

MigrationDescriptor.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory MigrationDescriptor.fromJson(Map<String, Object?> json) {
  final id = MigrationId.parse(json['id'] as String);
  final up = SchemaPlan.fromJson(json['up'] as Map<String, Object?>);
  final down = SchemaPlan.fromJson(json['down'] as Map<String, Object?>);
  return MigrationDescriptor(
    id: id,
    checksum: json['checksum'] as String,
    up: up,
    down: down,
  );
}