Skip to content

Commit 9968818

Browse files
Merge pull request #106 from dolan-in/matthewmcneely/schema-changes-for-upsert-tag
fix: Set schema unique tag if upsert is defined
2 parents e9a3497 + 0150429 commit 9968818

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

schema.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ func parseStructTag(tag string) (*rawSchema, error) {
395395
schema.List = true
396396
case "upsert":
397397
schema.Upsert = true
398+
schema.Unique = true
398399
case "lang":
399400
schema.Lang = true
400401
case "noconflict":

0 commit comments

Comments
 (0)