From 1ff04242d5e3943b72f3c398b3fa05a1675c8954 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 27 Sep 2020 15:53:06 +0200 Subject: Add missing database migration Should have been part of f0dd3fd59afac321317d3b52a36d179b4ea504f7. Oops. Signed-off-by: Florian Pritz --- Changes | 1 + lib/App/BorgRestore/DB.pm | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/Changes b/Changes index a40a774..1bb3489 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ Revision history for Perl extension App-BorgRestore {{$NEXT}} + - Add database migration for change from 3.4.2 3.4.2 2020-09-27T13:50:47Z - Fix missing cache data for top level files that exist with and without an 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) { -- cgit v1.2.3-24-g4f1b