From ac7f27093244cd81c83e7afd3cd87d6f21989d59 Mon Sep 17 00:00:00 2001 From: Austin Bonander Date: Thu, 27 Feb 2025 18:30:43 -0800 Subject: [PATCH] fix: sequential versioning inference for migrations --- sqlx-cli/src/opt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlx-cli/src/opt.rs b/sqlx-cli/src/opt.rs index 3230148e..afc45488 100644 --- a/sqlx-cli/src/opt.rs +++ b/sqlx-cli/src/opt.rs @@ -452,8 +452,8 @@ fn next_timestamp() -> String { fn next_sequential(migrator: &Migrator) -> Option { let next_version = migrator .migrations - .windows(2) - .last() + .rchunks(2) + .next() .and_then(|migrations| { match migrations { [previous, latest] => {