diff --git a/metadata/db.go b/metadata/db.go index f34f5831e099..507d6d22d011 100644 --- a/metadata/db.go +++ b/metadata/db.go @@ -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 diff --git a/metadata/db_test.go b/metadata/db_test.go index 9b3a1367ac0e..a0243cb85b99 100644 --- a/metadata/db_test.go +++ b/metadata/db_test.go @@ -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) { diff --git a/metadata/migrations.go b/metadata/migrations.go index 06c9da47dd0a..34febdd15965 100644 --- a/metadata/migrations.go +++ b/metadata/migrations.go @@ -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 +}