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
conhlee16mo ago
AUTOINCREMENT should work just fine in d1 so I'm not sure that's the issue
Stronk
StronkOP16mo 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
conhlee16mo ago
No, it looks fine. Maybe you're using an outdated version? What errors are you getting?
Stronk
StronkOP16mo 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
conhlee16mo ago
Does it work locally?
Stronk
StronkOP16mo ago
No
Want results from more Discord servers?
Add your server