diff --git a/yb-voyager/cmd/analyzeSchema.go b/yb-voyager/cmd/analyzeSchema.go index e473ee12c8..eacf247c51 100644 --- a/yb-voyager/cmd/analyzeSchema.go +++ b/yb-voyager/cmd/analyzeSchema.go @@ -222,18 +222,17 @@ const ( // Reports one case in JSON func reportCase(filePath string, reason string, ghIssue string, suggestion string, objType string, objName string, sqlStmt string, category string, docsLink string, impact string) { - var issue utils.AnalyzeSchemaIssue - issue.FilePath = filePath - issue.Reason = reason - issue.GH = ghIssue - issue.Suggestion = suggestion - issue.ObjectType = objType - issue.ObjectName = objName - issue.SqlStatement = sqlStmt - issue.IssueType = category // IssueType field of analyze schema should be renamed to Category - issue.Impact = lo.Ternary(impact != "", impact, constants.IMPACT_LEVEL_1) - if sourceDBType == POSTGRESQL { - issue.DocsLink = docsLink + issue := utils.AnalyzeSchemaIssue{ + IssueType: category, // TODO: to be replaced with Category as a field + Reason: reason, + Impact: lo.Ternary(impact != "", impact, constants.IMPACT_LEVEL_1), + ObjectType: objType, + ObjectName: objName, + SqlStatement: sqlStmt, + FilePath: filePath, + Suggestion: suggestion, + GH: ghIssue, + DocsLink: docsLink, } schemaAnalysisReport.Issues = append(schemaAnalysisReport.Issues, issue) diff --git a/yb-voyager/src/query/queryissue/issues_ddl.go b/yb-voyager/src/query/queryissue/issues_ddl.go index 30808d6cb5..24e0aa511c 100644 --- a/yb-voyager/src/query/queryissue/issues_ddl.go +++ b/yb-voyager/src/query/queryissue/issues_ddl.go @@ -30,7 +30,7 @@ var generatedColumnsIssue = issue.Issue{ Name: "Stored generated columns are not supported.", Impact: constants.IMPACT_LEVEL_1, GH: "https://github.com/yugabyte/yugabyte-db/issues/10695", - Suggestion: "Use Triggers to update the generated columns is one way to work around this issue, refer docs link for more details.", + Suggestion: "Using Triggers to update the generated columns is one way to work around this issue, refer docs link for more details.", DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#generated-always-as-stored-type-column-is-not-supported", } diff --git a/yb-voyager/src/utils/commonVariables.go b/yb-voyager/src/utils/commonVariables.go index 38a924486e..c7612b9a05 100644 --- a/yb-voyager/src/utils/commonVariables.go +++ b/yb-voyager/src/utils/commonVariables.go @@ -100,13 +100,13 @@ type DBObject struct { // TODO: support MinimumVersionsFixedIn in xml type AnalyzeSchemaIssue struct { - // TODO: rename IssueType to Category + // TODO: deprecate this and rename to Category IssueType string `json:"IssueType"` //category: unsupported_features, unsupported_plpgsql_objects, etc - ObjectType string `json:"ObjectType"` - ObjectName string `json:"ObjectName"` - Reason string `json:"Reason"` Type string `json:"-" xml:"-"` // identifier for issue type ADVISORY_LOCKS, SYSTEM_COLUMNS, etc + Reason string `json:"Reason"` Impact string `json:"-" xml:"-"` // temporary field; since currently we generate assessment issue from analyze issue + ObjectType string `json:"ObjectType"` + ObjectName string `json:"ObjectName"` SqlStatement string `json:"SqlStatement,omitempty"` FilePath string `json:"FilePath"` Suggestion string `json:"Suggestion"`