Issue 167 in flyway: Ignore line endings when calculating checksums

275 views
Skip to first unread message

fly...@googlecode.com

unread,
Sep 28, 2011, 11:50:29 AM9/28/11
to flywa...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

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.

fly...@googlecode.com

unread,
Jan 2, 2012, 2:04:24 AM1/2/12
to flywa...@googlegroups.com

Comment #1 on issue 167 by axel.fontai...@gmail.com: Ignore line

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?

fly...@googlecode.com

unread,
Jan 3, 2012, 10:02:59 AM1/3/12
to flywa...@googlegroups.com

Comment #2 on issue 167 by micha...@utest.com: Ignore line endings when
calculating checksums
http://code.google.com/p/flyway/issues/detail?id=167

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.

fly...@googlecode.com

unread,
Jul 24, 2012, 7:13:24 AM7/24/12
to flywa...@googlegroups.com
Updates:
Status: WontFix

Comment #3 on issue 167 by axel.fontai...@gmail.com: Ignore line
endings when calculating checksums
http://code.google.com/p/flyway/issues/detail?id=167

(No comment was entered for this change.)

fly...@googlecode.com

unread,
Oct 22, 2014, 7:46:22 AM10/22/14
to flywa...@googlegroups.com

Comment #4 on issue 167 by etouz...@gmail.com: Ignore line endings when
calculating checksums
https://code.google.com/p/flyway/issues/detail?id=167

would you accept a patch (on which I didn't even start looking into) that
would change flyway so that it would compute the checksum on the SQL string
with all the \r removed? That would effectively fix the problem completely
and allow the checksums to perform their purpose (check which SQL queries
were run) instead of making sure the companies using the tool use a single
OS or have a perfect git autocrlf setup :-)

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages