summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2019-09-28 10:35:45 +0200
committerFlorian Pritz <bluewind@xinu.at>2019-09-28 15:25:57 +0200
commitfc4f3d0f055708675a1fec9109daf6137678e8df (patch)
tree8540067f6a1e0adbc991d704fa80091939adfd9b
parent669d62894854ea2e2b0090d72a2a450a6f2ff60c (diff)
downloadApp-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.pm2
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();