Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DAT-15383] Fix checksum upgrade changes preventing useless updates and using AbstractChangeLogHistoryService for extensions compatibility #4508

Merged
merged 1 commit into from Jul 25, 2023

Conversation

filipelautert
Copy link
Collaborator

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

New method liquibase.changelog.visitor.UpdateVisitor#updateCheckSumIfRequired returns null if the change set has a stored checkSum, but it should return the old checksum value.
So everytime we get here we are updating the checksums for already executed checksums with the same value. It's not breaking anything but performance will be affected.

Steps To Reproduce
Run update using a changelog with 1 changeset
Add a new changeset to changelog
Run update SQL: first changelog will have the checksum updated and the second will execute just fine.
ex:

UPDATE public.databasechangelog SET MD5SUM = '9:56da2f293105bdbf802515b0581600f1' WHERE ID = '2' AND AUTHOR = 'fl' AND FILENAME = 'changelogs/changelog/simple_changelog.xml';

INSERT INTO public.databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID, TAG) VALUES ('2.5', 'fl', 'changelogs/changelog/simple_changelog.xml', NOW(), 4, '9:9a2f4bc8afbf0c9587b25b2ffd922d2e', 'tagDatabase', '', 'EXECUTED', 'v8', NULL, 'DEV', '7973169078', 'rb1');

@filipelautert filipelautert changed the title Fix checksum upgrade changes preventing useless updates and using AbstractChangeLogHistoryService for extensions compatibility [DAT-15383] Fix checksum upgrade changes preventing useless updates and using AbstractChangeLogHistoryService for extensions compatibility Jul 19, 2023
@filipelautert filipelautert marked this pull request as ready for review July 19, 2023 20:22
@suryaaki2 suryaaki2 merged commit 68a8ec8 into master Jul 25, 2023
49 of 50 checks passed
@suryaaki2 suryaaki2 deleted the DAT-15383 branch July 25, 2023 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants