From 5a6aff12900b335cc0dce35be582b83a20691824 Mon Sep 17 00:00:00 2001 From: fabianlindfors Date: Tue, 26 Jul 2022 16:00:08 +0200 Subject: [PATCH] Fix migration files not sorted naturally Closes #15 --- Cargo.toml | 3 ++- src/main.rs | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7363771..a312ded 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,4 +22,5 @@ toml = "0.5" version = "3.0.0" colored = "2" rand = "0.8" -dotenv = "0.15.0" \ No newline at end of file +dotenv = "0.15.0" +lexical-sort = "0.3.1" \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 41d64fa..5baf940 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,7 @@ use std::{ path::Path, }; -use anyhow::{Context}; +use anyhow::Context; use clap::{Args, Parser}; use reshape::{ migrations::{Action, Migration}, @@ -196,7 +196,13 @@ fn find_migrations(opts: &FindMigrationsOptions) -> anyhow::Result anyhow::Result