multi: pass in a MigrationConfig to all optional migrations
Define a MigrationConfig interface that should be used to pass the config of an optional migration function. An implementation of this interface is added for migration30 (the only current optional migration).
This commit is contained in:
5 files changed
+45
-9
No files matched your search
@@ -530,7 +530,9 @@ func TestApplyOptionalVersions(t *testing.T) {
|
||||
// Overwrite the migration function so we can count how many times the
|
||||
// migration has happened.
|
||||
migrateCount := 0
|
||||
optionalVersions[0].migration = func(_ kvdb.Backend) error {
|
||||
optionalVersions[0].migration = func(_ kvdb.Backend,
|
||||
_ MigrationConfig) error {
|
||||
|
||||
migrateCount++
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user