Skip to content

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

refactor: use NewColumnNotExistsError (#17362)

h3n4l8d5a01fbe2a3
diff --git a/backend/plugin/advisor/catalog/walk_through.go b/backend/plugin/advisor/catalog/walk_through.go
index db929e079f..a077ab4d59 100644
--- a/backend/plugin/advisor/catalog/walk_through.go
+++ b/backend/plugin/advisor/catalog/walk_through.go
@@ -713,10 +713,7 @@ func (t *TableState) renameColumn(ctx *FinderContext, oldName string, newName st
column, exists := t.columnSet[strings.ToLower(oldName)]
if !exists {
if ctx.CheckIntegrity {
- return &WalkThroughError{
- Type: ErrorTypeColumnNotExists,
- Content: fmt.Sprintf("Column `%s` does not exist in table `%s`", oldName, t.name),
- }
+ return NewColumnNotExistsError(t.name, oldName)
}
column = t.createIncompleteColumn(oldName)
}