Describe name of field for invalid SQL datatypes

This commit is contained in:
Devin Samarin 2019-10-04 13:50:29 -07:00 committed by GitHub
parent 81c17a7e25
commit 2f85b6ad41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,7 +120,7 @@ func (s *mysql) DataTypeOf(field *StructField) string {
} }
if sqlType == "" { 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) == "" { if strings.TrimSpace(additionalType) == "" {