From 87ff58b598c607fa260295732bc00e67b3272894 Mon Sep 17 00:00:00 2001 From: Will Glynn Date: Tue, 17 Mar 2015 09:04:12 -0500 Subject: [PATCH] Fix creation of composite unique indexes --- scope_private.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) } }