mirror of
https://github.com/restic/restic.git
synced 2026-10-22 08:58:11 +00:00
migrate: Report why an migration cannot be applied
Just returning that `Migration upgrade cannot be applied: check failed` is not too useful when running `migrate upgrade_repo_v2`.
This commit is contained in:
1 parent
6c69f08a7b
commit
8b4dd70013
5 files changed
+20
-13
No files matched your search
@@ -8,8 +8,8 @@ import (
|
||||
|
||||
// Migration implements a data migration.
|
||||
type Migration interface {
|
||||
// Check returns true if the migration can be applied to a repo.
|
||||
Check(context.Context, restic.Repository) (bool, error)
|
||||
// Check returns true if the migration can be applied to a repo. If the option is not applicable it can return a specific reason.
|
||||
Check(context.Context, restic.Repository) (bool, string, error)
|
||||
|
||||
RepoCheck() bool
|
||||
|
||||
|
||||
Reference in new issue
Block a user