Re: Issue 183 in flyway: Calculation of checksum is platform encoding dependent

2,164 views
Skip to first unread message

fly...@googlecode.com

unread,
Nov 9, 2012, 5:25:35 AM11/9/12
to flywa...@googlegroups.com
Updates:
Summary: Calculation of checksum is platform encoding dependent
Status: Fixed
Labels: Component-Core

Comment #3 on issue 183 by axel.fontai...@gmail.com: Calculation of
checksum is platform encoding dependent
http://code.google.com/p/flyway/issues/detail?id=183

Hi Conny,

this is now fixed. As part of the metadata table upgrade coming in the next
release, existing checksums will be recalculated against the binary file,
ignoring the encoding completely.

Cheers,
Axel

fly...@googlecode.com

unread,
Apr 29, 2014, 9:53:36 PM4/29/14
to flywa...@googlegroups.com

Comment #4 on issue 183 by kundu.an...@gmail.com: Calculation of checksum
I'm using flyway 2.3.0. I have the same problem except that I'm not really
changing or explicitly setting the Encoding. I'm assuming by default its
UTF-8. Here is my scenario:

1. The first time I run this in Linux. The scripts are run successfully.
2. The next time I run the same unchanged scripts (no updates; same
filesize) from Windows and reference to the same Oracle host/schema. I now
get the checksum exception.

Other than overriding the Flyway.validate(), is there a way to suppress the
checksum validation? Will setting the encoding explicitly help?


Exception in thread "main" com.googlecode.flyway.core.api.FlywayException:
Validate failed. Found differences between applied migrations and available
migrations: Migration Checksum mismatch for migration
14_1/V14_1_1__5349_asset_group_null_delete.sql: DB=********,
Classpath=*********
at com.googlecode.flyway.core.Flyway.doValidate(Flyway.java:917)
at com.googlecode.flyway.core.Flyway.access$300(Flyway.java:59)
at com.googlecode.flyway.core.Flyway$2.execute(Flyway.java:894)
at com.googlecode.flyway.core.Flyway$2.execute(Flyway.java:888)
at com.googlecode.flyway.core.Flyway.execute(Flyway.java:1200)
at com.googlecode.flyway.core.Flyway.validate(Flyway.java:888)
at
com.xyz.dsp.pm.analytic.versioning.PmpVersioner.validateVersioner(PmpVersioner.java:146)

--
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

fly...@googlecode.com

unread,
Jul 22, 2014, 4:35:48 AM7/22/14
to flywa...@googlegroups.com

Comment #5 on issue 183 by harald.b...@gmail.com: Calculation of checksum
I think I have the same problem with flyway-3.0. Had not yet have time to
investigate the issue thoroughly.

I started with a fresh db and run integration test on jenkins (installed on
ubunut). The tests passed fine and flyway initialized my db.

Then I tried to execute those tests on a developer machine (windows) and
got:
Caused by: org.flywaydb.core.api.FlywayException: Validate failed. Found
differences between applied migrations and available migrations: Migration
Checksum mismatch for migration V0.0.1/V0.0.1_0001__CoreSchema.sql:
DB=417151822, Classpath=-775540741

Are you sure the encoding issue is fixed, or do I miss something else?

fly...@googlecode.com

unread,
Nov 8, 2014, 6:32:23 PM11/8/14
to flywa...@googlegroups.com

Comment #6 on issue 183 by everf...@gmail.com: Calculation of checksum is
platform encoding dependent
https://code.google.com/p/flyway/issues/detail?id=183

Have you ruled out that you have line-ending issues? (Linux and Windows
differ in their opinion about CRLF and LF as line endings.)
Reply all
Reply to author
Forward
0 new messages