From c310364b559b3f56d86d8271cb315fd43236ba4c Mon Sep 17 00:00:00 2001 From: Kurt Wolf Date: Mon, 12 Aug 2024 10:33:49 -0700 Subject: [PATCH] add debug --- cli/src/command/up.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/command/up.rs b/cli/src/command/up.rs index e07bd58..f454597 100644 --- a/cli/src/command/up.rs +++ b/cli/src/command/up.rs @@ -65,8 +65,8 @@ impl Up { eprintln!("{}: Created database snapshot.", file_path.display()); } - let iter = pending.iter().take(if self.all { pending.len() } else { 1 }); - for migration in iter { + let pending = pending.iter().take(if self.all { pending.len() } else { 1 }); + for migration in pending { debug!("Running migration: {}", migration.name); let file_path = folder.join(&migration.name).with_extension(migration.migration_type().extension()); let body = fs::read_to_string(&file_path)?;