Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: add troubleshoot link for migration version error (#13412)

Tianzhou (天舟)143192680e22
diff --git a/backend/utils/utils.go b/backend/utils/utils.go
index 8138f48d49..db78769757 100644
--- a/backend/utils/utils.go
+++ b/backend/utils/utils.go
@@ -345,7 +345,7 @@ func BeginMigration(ctx context.Context, stores *store.Store, m *db.MigrationInf
// For force migration, we will ignore the existing migration history and continue to migration.
return migrationHistory.UID, nil
case db.Failed:
- err := errors.Errorf("database %q version %s migration has failed, please check your database to make sure things are fine and then start a new migration using a new version ", m.Database, m.Version.Version)
+ err := errors.Errorf("database %q version %s migration has failed, please check your database to make sure things are fine and then start a new migration using a new version", m.Database, m.Version.Version)
slog.Debug(err.Error())
// For force migration, we will ignore the existing migration history and continue to migration.
return migrationHistory.UID, nil
diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunComment.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunComment.vue
index e1f344c861..03b3868077 100644
--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunComment.vue
+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunComment.vue
@@ -131,10 +131,16 @@ const commentLink = computed((): CommentLink => {
}
} else if (taskRun.status === TaskRun_Status.FAILED) {
const db = databaseForTask(issue.value, task);
- if (isPostgresFamily(db.instanceResource.engine)) {
+ // Cast a wide net to catch migration version error
+ if (comment.value.includes('version')) {
return {
title: t("common.troubleshoot"),
- link: "https://www.bytebase.com/docs/change-database/troubleshoot/#postgresql",
+ link: "https://www.bytebase.com/docs/change-database/troubleshoot/?source=console#duplicate-version",
+ };
+ } else if (isPostgresFamily(db.instanceResource.engine)) {
+ return {
+ title: t("common.troubleshoot"),
+ link: "https://www.bytebase.com/docs/change-database/troubleshoot/?source=console#postgresql",
};
}
}