Adds a no-op migration for metadata v3

Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
John Howard 2018-09-12 12:04:20 -07:00
parent f1cc4feea6
commit 8e44270723
3 changed files with 23 additions and 1 deletions

View File

@ -43,7 +43,7 @@ const (
// dbVersion represents updates to the schema
// version which are additions and compatible with
// prior version of the same schema.
dbVersion = 2
dbVersion = 3
)
// DB represents a metadata database backed by a bolt

View File

@ -265,6 +265,16 @@ func TestMigrations(t *testing.T) {
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) {

View File

@ -45,6 +45,11 @@ var migrations = []migration{
version: 2,
migrate: migrateIngests,
},
{
schema: "v1",
version: 3,
migrate: noOpMigration,
},
}
// addChildLinks Adds children key to the snapshotters to enforce snapshot
@ -154,3 +159,10 @@ func migrateIngests(tx *bolt.Tx) error {
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
}