Skip to content

Conversation

@paulrrogers
Copy link
Contributor

…t names and reorder them for consistency to workaround PTOSC quirk.

Percona's Online Schema Change can leave behind underscores on constraint names like:

  ...,
  CONSTRAINT _b_fk FOREIGN KEY('b') REFERENCES b ON('b'),
  CONSTRAINT a_fk FOREIGN KEY('a') REFERENCES a ON('a')
);

This enhancement optionally trims those and sorts the constraints as if PTOSC had not been used. This minimizes noise in source control as usage of PTOSC may not be ubiquitous or consistent in all environments, yet the schema is functionally identical.

  ...,
  CONSTRAINT a_fk FOREIGN KEY('a') REFERENCES a ON('a'),
  CONSTRAINT b_fk FOREIGN KEY('b') REFERENCES b ON('b')
);

…t names and reorder them for consistency to workaround PTOSC quirk.
@paulrrogers paulrrogers added the enhancement New feature or request label May 7, 2019
@paulrrogers paulrrogers self-assigned this May 7, 2019
@paulrrogers paulrrogers merged commit 05f0596 into master May 8, 2019
@paulrrogers paulrrogers deleted the feature/trim-underscores-from-foreign branch May 8, 2019 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants