fix: primary key unique key simultaneously exist cacheIdPrefix duplicate (#3763)

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
master
guangwu 12 months ago committed by GitHub
parent a1bbac3c6c
commit 05020a92e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -128,6 +128,8 @@ func Parse(filename, database string, strict bool) ([]*Table, error) {
return nil, fmt.Errorf("%s: unexpected join primary key", prefix) 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) primaryKey, fieldM, err := convertColumns(columns, primaryColumn, strict)
if err != nil { if err != nil {
return nil, err return nil, err

Loading…
Cancel
Save