#Auto incrementing primary key in Astro DB?
9 messages · Page 1 of 1 (latest)
primaryKey: true in your db schema is what's worked for me -
Just declaring a column as the primary key does not auto increment the primary key
It absolutely does for me whenever I've inserted new data 🤷♂️
Maybe I found a bug, but just declaring a key as primary does not actually auto increment the key in any code I've tried
Ah, I see. It will auto increment for numbers, but not UUIDs. That would be helpful information to include in the documentation
UUID's don't typically auto-increment, but rather are generated as a default value using some function