errorMessages property

List<String> get errorMessages

Human-readable list of differences between expectedColumn and actualColumn.

Empty is there are no differences.

Implementation

List<String> get errorMessages {
  if (expectedColumn == null && actualColumn != null) {
    return [
      "Column '${actualColumn!.name}' in table '${actualColumn!.table!.name}' should NOT exist, but is created by migration files"
    ];
  } else if (expectedColumn != null && actualColumn == null) {
    return [
      "Column '${expectedColumn!.name}' in table '${expectedColumn!.table!.name}' should exist, but is NOT created by migration files"
    ];
  }

  return _differingProperties.map((property) {
    return property.getErrorMessage(
      expectedColumn!.table!.name,
      expectedColumn!.name,
    );
  }).toList();
}