I was breaking another case

EncryptedPassword []byte         `json:"-" sql:"encrypted_password;not null"`
This commit is contained in:
Bruno Sato 2015-11-06 18:55:56 -02:00
parent 67f88d977b
commit b27ac1a996
1 changed files with 2 additions and 3 deletions

View File

@ -54,10 +54,9 @@ func (postgres) SqlTag(value reflect.Value, size int, autoIncrease bool) string
}
default:
if isByteArrayOrSlice(value) {
if isUUID(value) {
return "uuid"
}
return "bytea"
} else if isUUID(value) {
return "uuid"
}
}
panic(fmt.Sprintf("invalid sql type %s (%s) for postgres", value.Type().Name(), value.Kind().String()))