good morning!!!!

Skip to content
Snippets Groups Projects
Commit d876f214 authored by Ferenc Szabo's avatar Ferenc Szabo Committed by Viktor Trón
Browse files

swarm/storage: move 'running migrations for' log line (#18120)

So that we only see the log message when we actually have to migrate.
parent 7bf7bd2f
No related branches found
No related tags found
No related merge requests found
......@@ -194,7 +194,8 @@ func (ls *LocalStore) Close() {
ls.DbStore.Close()
}
// Migrate checks the datastore schema vs the runtime schema, and runs migrations if they don't match
// Migrate checks the datastore schema vs the runtime schema and runs
// migrations if they don't match
func (ls *LocalStore) Migrate() error {
actualDbSchema, err := ls.DbStore.GetSchema()
if err != nil {
......@@ -202,12 +203,12 @@ func (ls *LocalStore) Migrate() error {
return err
}
log.Debug("running migrations for", "schema", actualDbSchema, "runtime-schema", CurrentDbSchema)
if actualDbSchema == CurrentDbSchema {
return nil
}
log.Debug("running migrations for", "schema", actualDbSchema, "runtime-schema", CurrentDbSchema)
if actualDbSchema == DbSchemaNone {
ls.migrateFromNoneToPurity()
actualDbSchema = DbSchemaPurity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment