diff --git a/refinery/tests/rusqlite.rs b/refinery/tests/rusqlite.rs index 258af424..2223c75e 100644 --- a/refinery/tests/rusqlite.rs +++ b/refinery/tests/rusqlite.rs @@ -349,8 +349,8 @@ mod rusqlite { assert_eq!("initial", migrations[0].name()); assert_eq!("add_cars_table", applied_migrations[1].name()); - assert_eq!(2959965718684201605, applied_migrations[0].checksum()); - assert_eq!(8238603820526370208, applied_migrations[1].checksum()); + assert_eq!(1002061374193754426, applied_migrations[0].checksum()); + assert_eq!(17421455799783963888, applied_migrations[1].checksum()); } #[test] @@ -385,8 +385,8 @@ mod rusqlite { assert_eq!("initial", migrations[0].name()); assert_eq!("add_cars_table", applied_migrations[1].name()); - assert_eq!(2959965718684201605, applied_migrations[0].checksum()); - assert_eq!(8238603820526370208, applied_migrations[1].checksum()); + assert_eq!(1002061374193754426, applied_migrations[0].checksum()); + assert_eq!(17421455799783963888, applied_migrations[1].checksum()); } #[test] diff --git a/refinery_core/src/runner.rs b/refinery_core/src/runner.rs index 46d4d714..daba0396 100644 --- a/refinery_core/src/runner.rs +++ b/refinery_core/src/runner.rs @@ -89,7 +89,7 @@ impl Migration { let mut hasher = SipHasher13::new(); name.hash(&mut hasher); version.hash(&mut hasher); - sql.hash(&mut hasher); + sql.lines().for_each(|line| line.trim().hash(&mut hasher)); let checksum = hasher.finish(); Ok(Migration {