Describe name of field for invalid SQL datatypes (#2689)

This commit is contained in:
Devin Samarin 2019-10-17 07:56:19 -07:00 committed by Jinzhu
parent 820b5f244a
commit d2007b3c82
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ func (s *mysql) DataTypeOf(field *StructField) string {
}
if sqlType == "" {
panic(fmt.Sprintf("invalid sql type %s (%s) for mysql", dataValue.Type().Name(), dataValue.Kind().String()))
panic(fmt.Sprintf("invalid sql type %s (%s) in field %s for mysql", dataValue.Type().Name(), dataValue.Kind().String(), field.Name))
}
if strings.TrimSpace(additionalType) == "" {