From b16674c0f54a04e27ae4ebd2f74e4ee77acf7397 Mon Sep 17 00:00:00 2001 From: Ivan Valkov Date: Fri, 30 Jun 2017 16:09:31 +0100 Subject: [PATCH] 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. --- scope.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scope.go b/scope.go index 9a237998..a21b7422 100644 --- a/scope.go +++ b/scope.go @@ -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"