chore: fix cli
This commit is contained in:
parent
7f478671b1
commit
9552ece678
3 changed files with 3 additions and 5 deletions
|
@ -20,7 +20,7 @@ sqlite = ["migra/sqlite"]
|
|||
mysql = ["migra/mysql"]
|
||||
|
||||
[dependencies]
|
||||
migra = { version = "0", path = "../migra" }
|
||||
migra = { version = "1", path = "../migra" }
|
||||
cfg-if = "1.0"
|
||||
structopt = "0.3"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
|
|
@ -35,8 +35,7 @@ pub(crate) fn print_migration_lists(app: &App) -> migra::StdResult<()> {
|
|||
println!();
|
||||
|
||||
let all_migrations = migra::fs::get_all_migrations(&config.migration_dir_path())?;
|
||||
let pending_migrations =
|
||||
migra::fs::filter_pending_migrations(&all_migrations, &applied_migrations);
|
||||
let pending_migrations = all_migrations.exclude(&applied_migrations);
|
||||
|
||||
show_pending_migrations(&pending_migrations);
|
||||
|
||||
|
|
|
@ -16,8 +16,7 @@ pub(crate) fn upgrade_pending_migrations(
|
|||
let applied_migration_names = client.get_applied_migrations()?;
|
||||
let all_migrations = migra::fs::get_all_migrations(&migrations_dir_path)?;
|
||||
|
||||
let pending_migrations =
|
||||
migra::fs::filter_pending_migrations(&all_migrations, &applied_migration_names);
|
||||
let pending_migrations = all_migrations.exclude(&applied_migration_names);
|
||||
if pending_migrations.is_empty() {
|
||||
println!("Up to date");
|
||||
return Ok(());
|
||||
|
|
Reference in a new issue