diff options
Diffstat (limited to 'lib/App/BorgRestore/DB.pm')
-rw-r--r-- | lib/App/BorgRestore/DB.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/App/BorgRestore/DB.pm b/lib/App/BorgRestore/DB.pm index 50f5854..319ce55 100644 --- a/lib/App/BorgRestore/DB.pm +++ b/lib/App/BorgRestore/DB.pm @@ -80,7 +80,14 @@ method _migrate() { my $archive_id = $self->get_archive_id($archive); $self->{dbh}->do("alter table `files` rename column `timestamp-$archive` to `$archive_id`"); } -}, + }, + 3 => 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) { |