Skip to content

Commit

Permalink
distinguish between schema.Time and tag time
Browse files Browse the repository at this point in the history
  • Loading branch information
black-06 committed Feb 20, 2023
1 parent 7f4b498 commit a497301
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sqlite.go
Expand Up @@ -178,7 +178,12 @@ func (dialector Dialector) DataTypeOf(field *schema.Field) string {
case schema.String:
return "text"
case schema.Time:
return "datetime"
// Distinguish between schema.Time and tag time
if val, ok := field.TagSettings["TYPE"]; ok {
return val
} else {
return "datetime"
}
case schema.Bytes:
return "blob"
}
Expand Down

0 comments on commit a497301

Please sign in to comment.