diff options
author | Florian Pritz <bluewind@xinu.at> | 2019-09-28 10:35:45 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2019-09-28 15:25:57 +0200 |
commit | fc4f3d0f055708675a1fec9109daf6137678e8df (patch) | |
tree | 8540067f6a1e0adbc991d704fa80091939adfd9b | |
parent | 669d62894854ea2e2b0090d72a2a450a6f2ff60c (diff) | |
download | App-BorgRestore-fc4f3d0f055708675a1fec9109daf6137678e8df.tar.gz App-BorgRestore-fc4f3d0f055708675a1fec9109daf6137678e8df.tar.xz |
DB: Apply migration is correct order
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | lib/App/BorgRestore/DB.pm | 2 |
1 files changed, 1 insertions, 1 deletions
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(); |