feat(cmd): log actual plugin migration version instead of up-to-date

This commit is contained in:
ryan
2026-08-29 11:11:51 +08:00
parent 4d65e57f9a
commit b624de9620
+7 -2
View File
@@ -285,10 +285,15 @@ func (e *gooseEngine) Migrate(ctx *core.Context, entries []core.MigrationEntry)
return fmt.Errorf("migration %s: apply %w", entry.PluginID, err)
}
version, vErr := provider.GetDBVersion(context.Background())
if vErr != nil {
version = 0
}
if len(results) > 0 {
log.Printf("[migrate] %s: applied %d migration(s)", entry.PluginID, len(results))
log.Printf("[migrate] %s: applied %d migration(s) (v%d)", entry.PluginID, len(results), version)
} else {
log.Printf("[migrate] %s: up to date", entry.PluginID)
log.Printf("[migrate] %s: v%d", entry.PluginID, version)
}
}