summaryrefslogtreecommitdiffstats
path: root/lib/App
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2020-09-27 15:53:06 +0200
committerFlorian Pritz <bluewind@xinu.at>2020-09-27 15:53:31 +0200
commit1ff04242d5e3943b72f3c398b3fa05a1675c8954 (patch)
tree097bf1c786757e084b2a64860e5d005bf9047718 /lib/App
parent100a39872058d3d8a24c47425c77fa4dc22ded47 (diff)
downloadApp-BorgRestore-1ff04242d5e3943b72f3c398b3fa05a1675c8954.tar.gz
App-BorgRestore-1ff04242d5e3943b72f3c398b3fa05a1675c8954.tar.xz
Add missing database migration
Should have been part of f0dd3fd59afac321317d3b52a36d179b4ea504f7. Oops. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib/App')
-rw-r--r--lib/App/BorgRestore/DB.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/App/BorgRestore/DB.pm b/lib/App/BorgRestore/DB.pm
index 319ce55..3d1d6ad 100644
--- a/lib/App/BorgRestore/DB.pm
+++ b/lib/App/BorgRestore/DB.pm
@@ -88,6 +88,13 @@ method _migrate() {
$self->{dbh}->do('delete from `archives`');
$self->{dbh}->do('delete from `files`');
},
+ 4 => sub {
+ # Drop all cached files due to a bug in
+ # lib/App/BorgRestore/PathTimeTable/DB.pm that caused certain files
+ # to be skipped rather than being added to the `files` table.
+ $self->{dbh}->do('delete from `archives`');
+ $self->{dbh}->do('delete from `files`');
+ },
};
for my $target_version (sort { $a <=> $b } keys %$schema) {