Skip to content

Unmark SchemaDiff/TableDiff/ColumnDiff as final or provide an interface #7032

@VincentLanglet

Description

@VincentLanglet

Feature Request

What

The PR #6923 mark Diff classes as final but do not provide/use Interface for these which blocks the ability to extends those classes. (cc @greg0ire @morozov)

Why

I wrote my own custom Comparator which allows to generate PgSql constraint check like

ALTER TABLE foo ADD CONSTRAINT foo_check CHECK (tone IN (\'foo\', \'bar\', \'baz\'))

This need

  • to extends the Diff classes in order to add more data in them
  • to override the isEmpty method of those Diff classes.

How

One solution would be to

  • Remove @final on those classes
  • Introduce an interface for these
  • Changing the param/return type in 5.0
  • Re-add @final.

Another solution would be to

  • Remove @internal to the constructor
  • Add a new param like extraChanges
  • Updating the isEmpty method to check extraChanges too

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions