New issue 167 by micha...@utest.com: Ignore line endings when calculating
checksums
http://code.google.com/p/flyway/issues/detail?id=167
We ran into the following problem.
Developer on Mac/Linux creates a sql migration file and checks it into
Git. It runs on production (which is on Linux) just fine.
Then a Windows developer takes a copy of the production database and loads
it into their local machine. But when they pulled the sql migration file
from Git, it automatically converted the line endings to CRLF (Windows
style). Now Flyway validate and migrate fail saying there is a checksum
mismatch.
One solution I can think of would be to ignore line endings when doing the
checksum.
There are two workarounds for this:
- Don't use Git with core.autocrlf
- Set the checksum to null on the DEV DB after the restore from PROD
Would any of these be a workable solution for you?
Hi Axel,
Thanks for looking into it.
The workaround that we went with was updating our Maven configuration to
always convert line endings to unix style on all of our db scripts before
running Flyway on them. It is working fine for us, so this is not an
important issue any more.