#autoIncrement for astro db
3 messages · Page 1 of 1 (latest)
I think Astro DB uses Drizzle ORM, so it should be possible, but I think @vast egret is our expert of DB, so don't take my word for it, he knows much better
column.number({ primaryKey: true })
In SQLite,
integer primary keyimplicitly makes the column auto-incrementing.
All you need is to use Number column type and set it as primary key and it will do everything for you! (since AstroDB uses libsql/sqlite under the hood)