Merge pull request #426 from willglynn/composite_unique_indexes

Fix creation of composite unique indexes
This commit is contained in:
Jinzhu 2015-03-18 08:43:40 +08:00
commit 17b20bcdd8
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}
}