Closed saulortega closed 6 years ago
Well, I'm trying to do a debug and I see SQLBoiler is running this:
INSERT INTO "device_data" ("id", "device_unit_id", "device_manufacturer", "longitude", "latitude", "altitude", "speed", "direction") VALUES ($1,$2,$3,$4,$5,$6,$7,$8) ON CONFLICT DO NOTHING
And that syntaxis is wrong for Postgres.
ERROR: syntax error at or near "ON"
LINE 2: VALUES (1516629669,1516629671,5,74,4,2600,0,20) ON CONFLICT...
^
********** Error **********
ERROR: syntax error at or near "ON"
SQL state: 42601
Character: 183
EDIT: Ok, my Postgres version is old. ON CONFLICT is supported only from 9.5. :(
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 -v ./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)(«go test» dont have -d flag)
Please provide a relevant database schema so we can replicate your issue (Provided you are comfortable sharing this)
This is my first attemp to implement SQLBoiler, and I get this error.
My sqlboiler.toml:
whitelist=["vehicles", "devices", "device_data"] blacklist=["migrations", "other"] debug=true schema="public" [postgres] ...