mirror of https://github.com/go-gorm/gorm.git
Merge pull request #22 from siesta/master
Postgresql Dialect: fix primary tag for int types
This commit is contained in:
commit
2b36ccddd0
|
@ -45,7 +45,7 @@ func (d *postgres) SqlTag(column interface{}, size int) string {
|
||||||
func (s *postgres) PrimaryKeyTag(column interface{}, size int) string {
|
func (s *postgres) PrimaryKeyTag(column interface{}, size int) string {
|
||||||
switch column.(type) {
|
switch column.(type) {
|
||||||
case int, int8, int16, int32, uint, uint8, uint16, uint32:
|
case int, int8, int16, int32, uint, uint8, uint16, uint32:
|
||||||
return "sehrial"
|
return "serial"
|
||||||
case int64, uint64:
|
case int64, uint64:
|
||||||
return "bigserial"
|
return "bigserial"
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue