MCPcopy Create free account
hub / github.com/bytebase/bytebase / writeTableCommentDiff

Function writeTableCommentDiff

backend/plugin/schema/pg/metadata_migration.go:1408–1413  ·  view source on GitHub ↗
(out *strings.Builder, schemaName, tableName, oldComment, newComment string)

Source from the content-addressed store, hash-verified

1406}
1407
1408func writeTableCommentDiff(out *strings.Builder, schemaName, tableName, oldComment, newComment string) error {
1409 if oldComment == newComment {
1410 return nil
1411 }
1412 return writeComment(out, fmt.Sprintf("TABLE \"%s\".\"%s\"", schemaName, tableName), newComment)
1413}
1414
1415func writeColumnCommentDiff(out *strings.Builder, schemaName, tableName, columnName, comment string) error {
1416 return writeComment(out, fmt.Sprintf("COLUMN \"%s\".\"%s\".\"%s\"", schemaName, tableName, columnName), comment)

Callers 1

writeAlterTableDiffFunction · 0.85

Calls 1

writeCommentFunction · 0.85

Tested by

no test coverage detected