Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix migration checksum comparison during
migrate info
(#1888)
When running `sqlx migrate info`, the applied migrations checksums are compared against the checksums of the local migration files. While the checksums of applied migrations are stored correctly in the database as sha384sum values, the `migrate info` command was incorrectly comparing these against the checksums of down-migrations in cases where reversible migrations are being used (e.g. when migrations end in `.up.sql` and `.down.sql`). This fixes the issue by skipping over any migrations with the `MigrationType::ReversibleDown` type, using the same idiom as is used when running migrations (with `migrate run`). Issue introduced in #1680 Partially resolves #1158
- Loading branch information