Updated scope.go to always quote when adding index

I am using numbers for column names (to be compatible with protobuf) and adding unique index to them does not work since they are not quoted. I do not see a reason to check if the column name is a string in order to quote it. Correct me if I am wrong.
This commit is contained in:
Ivan Valkov 2017-06-30 16:09:31 +01:00 committed by GitHub
parent eae7f6be60
commit b16674c0f5

View File

@ -1143,7 +1143,7 @@ func (scope *Scope) addIndex(unique bool, indexName string, column ...string) {
var columns []string
for _, name := range column {
columns = append(columns, scope.quoteIfPossible(name))
columns = append(columns, scope.Quote(name))
}
sqlCreate := "CREATE INDEX"