Closed saulortega closed 6 years ago
Maybe you have to add "time with time zone" and "time without time zone" in postgres.go:
case "date", "time", "timestamp without time zone", "timestamp with time zone":
c.Type = "time.Time"
Very likely. Have you tried this change to see if it helped?
I just tried, and yes, it works with this simple change.
I submited a PR: https://github.com/volatiletech/sqlboiler/pull/253
What version of SQLBoiler are you using (
sqlboiler --version
)?SQLBoiler v2.6.0
If this happened at generation time what was the full SQLBoiler command you used to generate your models? (if not applicable leave blank)
go test ./models/
If this happened at runtime what code produced the issue? (if not applicable leave blank)
What is the output of the command above with the
-d
flag added to it? (Provided you are comfortable sharing this, it contains a blueprint of your schema)-d flag not recognized:
flag provided but not defined: -d
Only go test ./models/:
Please provide a relevant database schema so we can replicate your issue (Provided you are comfortable sharing this)
Further information. What did you do, what did you expect?
I expected a time.Time type, not string: