diesel-rs / diesel

A safe, extensible ORM and Query Builder for Rust
https://diesel.rs
Apache License 2.0
12.55k stars 1.05k forks source link

MigrationHarness::pending_migrations() doesn't check for incompatible migrations #4235

Closed lxfind closed 1 week ago

lxfind commented 1 week ago

https://github.com/diesel-rs/diesel/blob/master/diesel_migrations/src/migration_harness.rs#L126 When getting the list of pending migrations, it did not check that some migrations in the DB may not be part of the source migrations, i.e. incompatible. We should error out there if the remove failed.

weiznich commented 1 week ago

Please use the provided bug template if you want to fill an issue, otherwise this will be closed as invalid.

Otherwise you really need to explain why we should change the existing behavior there, as this function exactly behaves as described: It returns a list of migrations that are not applied to the database yet, which is still true if the source doesn't contain all migrations that are applied to the database.

weiznich commented 1 week ago

Closed due to no response from @lxfind. Feel free to edit the issue later to add the requested details, otherwise this is just not an issue.