Archived
1
0
Fork 0

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

View file

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