Quote db name when create primary keys

This commit is contained in:
Jinzhu 2015-05-22 11:13:14 +08:00
parent c2dda88f9a
commit cbebcf6d6f
1 changed files with 1 additions and 1 deletions

View File

@ -475,7 +475,7 @@ func (scope *Scope) createTable() *Scope {
}
if field.IsPrimaryKey {
primaryKeys = append(primaryKeys, field.DBName)
primaryKeys = append(primaryKeys, scope.Quote(field.DBName))
}
scope.createJoinTable(field)
}