refac: revert applied migrations for list

... command and visually separated applied and pending migrations
This commit is contained in:
Dmitriy Pleshevskiy 2021-02-06 01:39:12 +03:00
parent 64381eb710
commit fc68f9b6ae
1 changed files with 3 additions and 0 deletions

View File

@ -89,9 +89,12 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
} else {
applied_migrations
.iter()
.rev()
.for_each(|name| println!("{}", name));
}
println!();
let pending_migrations = config.migrations()?
.into_iter()
.filter(|m| !applied_migrations.contains(m.name()))