Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiangreco committed Feb 19, 2025
1 parent a8757c9 commit 3ab6ac2
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ func (c *SchemaTable) fetchColumnsDefinitions(ctx context.Context, schemaName st
return nil, err
}

// Append column to the last index if it's the same as the previous one (i.e. multi-column index)
if nIndexes := len(tblSpec.Indexes); nIndexes > 0 && tblSpec.Indexes[nIndexes-1].Name == indexName {
lastIndex := &tblSpec.Indexes[nIndexes-1]
if len(lastIndex.Columns) != seqInIndex-1 {
Expand Down

0 comments on commit 3ab6ac2

Please sign in to comment.