From 8511c09c63443ab1363e2bae65b68bc58928b459 Mon Sep 17 00:00:00 2001 From: Steven Date: Thu, 29 Aug 2024 22:59:56 +0800 Subject: [PATCH] chore: tweak migrator --- store/migrator.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/store/migrator.go b/store/migrator.go index 00061be..31e217e 100644 --- a/store/migrator.go +++ b/store/migrator.go @@ -277,6 +277,12 @@ func (s *Store) normalizedMigrationHistoryList(ctx context.Context) error { } schemaVersionMap[common.GetMinorVersion(fileSchemaVersion)] = fileSchemaVersion } + // Add the current schema version to the map. + currentSchemaVersion, err := s.GetCurrentSchemaVersion() + if err != nil { + return errors.Wrap(err, "failed to get current schema version") + } + schemaVersionMap[common.GetMinorVersion(currentSchemaVersion)] = currentSchemaVersion latestSchemaVersion := schemaVersionMap[latestMinorVersion] if latestSchemaVersion == "" {