D1 Tutorial Issue : SQL Syntax

This syntax from the comments api demo dosent seem to work in the current version of d1, specificaly the autoincrement syntax. How would I recreate this functionality of an auto incrementing id?
No description
6 Replies
conhlee
conhlee2y ago
AUTOINCREMENT should work just fine in d1 so I'm not sure that's the issue
Stronk
StronkOP2y ago
Can you try the provided SQL or provide one that works with autoincrement to confirm if it is an issue on my side. Does the provided syntax look wrong?
conhlee
conhlee2y ago
No, it looks fine. Maybe you're using an outdated version? What errors are you getting?
Stronk
StronkOP2y ago
I don't have it on hand right now so I can't copy paste it, but it said something about a syntax error and autoincrement and wouldn't run the SQL file because if the autoincrement line. When I removed the autoincrement part it worked. X [ERROR] A request to the Cloudflare API (/accounts/.../.../query) failed. near "AUTOINCREMENT": syntax error [code: 7500]
conhlee
conhlee2y ago
Does it work locally?
Stronk
StronkOP2y ago
No

Did you find this page helpful?