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

Checksum for parsed scripts depends on the system's line ending #182

Closed
felixkrull-neuland opened this issue Feb 10, 2023 · 2 comments · Fixed by #183
Closed

Checksum for parsed scripts depends on the system's line ending #182

felixkrull-neuland opened this issue Feb 10, 2023 · 2 comments · Fixed by #183
Assignees
Labels
bug Something isn't working

Comments

@felixkrull-neuland
Copy link
Contributor

Currently migration scripts are read by splitting them into lines and then rejoining those lines using the system line separator (MigrationScriptReaderImpl.java:165). The checksum for the script is calculated based on the rejoined text.

This means the checksum depends on the line ending setting of the system: applying the same script on a Windows and a Linux system will lead to different checksums being stored and mixing them will lead to checksum conflict errors (if enabled). It's not even possible to circumvent this problem by changing the line endings of the file on disk since those are immediately discarded.

@xtermi2
Copy link
Collaborator

xtermi2 commented Feb 10, 2023

I expect this is more a shared dev environment problem, right, not a production issue?
@felixkrull-neuland is this solution suitable for you: #183
Then I would release a new version in the next days.

@felixkrull-neuland
Copy link
Contributor Author

This looks perfect, thanks!

You're right that it's more of a shared dev environment problem, and fully disabling evolutions in situations like that would be a good idea anyway. But the behaviour still surprised us.

xtermi2 added a commit that referenced this issue Feb 13, 2023
…dependent_checksum_calculation

fixed #182: stable and system independent checksum calculation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants