diff --git a/scope_private.go b/scope_private.go index e51e1faf..6d700cb9 100644 --- a/scope_private.go +++ b/scope_private.go @@ -570,7 +570,7 @@ func (scope *Scope) autoIndex() *Scope { if name == "UNIQUE_INDEX" { name = fmt.Sprintf("uix_%v_%v", scope.TableName(), field.DBName) } - uniqueIndexes[name] = append(indexes[name], field.DBName) + uniqueIndexes[name] = append(uniqueIndexes[name], field.DBName) } }