Skip to content

Commit cf6a20d

Browse files
committed
fix: Improve formatting
1 parent a0f5225 commit cf6a20d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

schema/table.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,15 +338,17 @@ func GetChangesSummary(tablesChanges map[string][]TableColumnChange) string {
338338
tables := lo.Keys(tablesChanges)
339339
slices.Sort(tables)
340340
summary := strings.Builder{}
341-
for _, table := range tables {
341+
for i, table := range tables {
342342
summary.WriteString(fmt.Sprintf("%s:\n", table))
343343
changes := tablesChanges[table]
344344
changesString := lo.Map(changes, func(change TableColumnChange, _ int) string {
345345
return fmt.Sprintf(" - %s", getColumnChangeSummary(change))
346346
})
347347
slices.Sort(changesString)
348348
summary.WriteString(strings.Join(changesString, "\n"))
349-
summary.WriteString("\n")
349+
if i < len(tables)-1 {
350+
summary.WriteString("\n\n")
351+
}
350352
}
351353

352354
return summary.String()

0 commit comments

Comments
 (0)