Skip to content

Commit

Permalink
fix: primary key unique key simultaneously exist cacheIdPrefix duplicate
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <[email protected]>
  • Loading branch information
testwill authored and kevwan committed Dec 11, 2023
1 parent a1bbac3 commit b103549
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/goctl/model/sql/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ func Parse(filename, database string, strict bool) ([]*Table, error) {
return nil, fmt.Errorf("%s: unexpected join primary key", prefix)
}

delete(uniqueKeyMap, indexNameGen(primaryColumn, "idx"))
delete(uniqueKeyMap, indexNameGen(primaryColumn, "unique"))
primaryKey, fieldM, err := convertColumns(columns, primaryColumn, strict)
if err != nil {
return nil, err
Expand Down

0 comments on commit b103549

Please sign in to comment.