コード例 #1
0
  @Override
  public Change[] fixChanged(
      DatabaseObject changedObject,
      ObjectDifferences differences,
      DiffOutputControl control,
      Database referenceDatabase,
      final Database comparisonDatabase,
      ChangeGeneratorChain chain) {
    Table table = (Table) changedObject;

    Difference changedRemarks = differences.getDifference("remarks");
    if (changedRemarks != null) {
      SetTableRemarksChange change = new SetTableRemarksChange();
      if (control.getIncludeCatalog()) {
        change.setCatalogName(table.getSchema().getCatalogName());
      }
      if (control.getIncludeSchema()) {
        change.setSchemaName(table.getSchema().getName());
      }

      change.setTableName(table.getName());
      change.setRemarks(table.getRemarks());

      return new Change[] {change};
    }

    return null;
  }