Flyway Error - When I run migrate command. I get "Unable to calculate checksum" Flyway Error - When I run migrate command. I get "Unable to calculate checksum" docker docker

Flyway Error - When I run migrate command. I get "Unable to calculate checksum"


In my case I had to change the sql file encoding from ANSI to UTF-8 to avoid this error.

I did this by opening the sql file in Notepad++. After clicking "Convert to UTF-8" from the "Encoding" menu I saved the file and reran the flyway command with success.


I found the solution, The problem was in the line endings. My file had inconsistent Line endings. some lines ends with \r\n and another ending with \r or \n. This hapend because I generated a sql script since SQL Management Studio.normalize inconsistent line endingsThe solution was in SQL Management Studio too.enter image description here