From fc4f3d0f055708675a1fec9109daf6137678e8df Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 28 Sep 2019 10:35:45 +0200 Subject: DB: Apply migration is correct order Signed-off-by: Florian Pritz --- lib/App/BorgRestore/DB.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/App/BorgRestore') diff --git a/lib/App/BorgRestore/DB.pm b/lib/App/BorgRestore/DB.pm index 9a26493..62dc728 100644 --- a/lib/App/BorgRestore/DB.pm +++ b/lib/App/BorgRestore/DB.pm @@ -65,7 +65,7 @@ method _migrate() { }, }; - for my $target_version (keys %$schema) { + for my $target_version (sort { $a <=> $b } keys %$schema) { if ($version < $target_version) { $log->debugf("Migrating to schema version %s", $target_version); $self->{dbh}->begin_work(); -- cgit v1.2.3-24-g4f1b