Adds a no-op migration for metadata v3
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
f1cc4feea6
commit
8e44270723
@ -43,7 +43,7 @@ const (
|
|||||||
// dbVersion represents updates to the schema
|
// dbVersion represents updates to the schema
|
||||||
// version which are additions and compatible with
|
// version which are additions and compatible with
|
||||||
// prior version of the same schema.
|
// prior version of the same schema.
|
||||||
dbVersion = 2
|
dbVersion = 3
|
||||||
)
|
)
|
||||||
|
|
||||||
// DB represents a metadata database backed by a bolt
|
// DB represents a metadata database backed by a bolt
|
||||||
|
@ -265,6 +265,16 @@ func TestMigrations(t *testing.T) {
|
|||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: "NoOp",
|
||||||
|
init: func(tx *bolt.Tx) error {
|
||||||
|
return nil
|
||||||
|
},
|
||||||
|
check: func(tx *bolt.Tx) error {
|
||||||
|
return nil
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(migrationTests) != len(migrations) {
|
if len(migrationTests) != len(migrations) {
|
||||||
|
@ -45,6 +45,11 @@ var migrations = []migration{
|
|||||||
version: 2,
|
version: 2,
|
||||||
migrate: migrateIngests,
|
migrate: migrateIngests,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
schema: "v1",
|
||||||
|
version: 3,
|
||||||
|
migrate: noOpMigration,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// addChildLinks Adds children key to the snapshotters to enforce snapshot
|
// addChildLinks Adds children key to the snapshotters to enforce snapshot
|
||||||
@ -154,3 +159,10 @@ func migrateIngests(tx *bolt.Tx) error {
|
|||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// noOpMigration was for a database change from boltdb/bolt which is no
|
||||||
|
// longer being supported, to go.etcd.io/bbolt which is the currently
|
||||||
|
// maintained repo for boltdb.
|
||||||
|
func noOpMigration(tx *bolt.Tx) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user