Skip to content

Commit 8274f17

Browse files
authored
fix: Fix panic when converting schema changes to string (#1885)
`previous` is never set so shouldn't be stringified
1 parent 9be63fe commit 8274f17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

schema/table.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ func (t TableColumnChange) String() string {
231231
case TableColumnChangeTypeRemoveUniqueConstraint:
232232
return fmt.Sprintf("column: %s, previous: %s", t.ColumnName, t.Previous)
233233
case TableColumnChangeTypeMoveToCQOnly:
234-
return fmt.Sprintf("multi-column: %s, type: %s, previous: %s", t.ColumnName, t.Type, t.Previous)
234+
return fmt.Sprintf("multi-column: %s, type: %s", t.ColumnName, t.Type)
235235
default:
236236
return fmt.Sprintf("column: %s, type: %s, current: %s, previous: %s", t.ColumnName, t.Type, t.Current, t.Previous)
237237
}

0 commit comments

Comments
 (0)