You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can tell, the reason the sequence was not created is that in SQLite you get unique autoincremented ID column (called ROWID) for any table that has INTEGER PRIMARY KEY column in it.
That being said, there is a dedicated AUTOINCREMENT keyword in SQLite, which ensures that the next ROWID is is at least one larger than the largest ROWID that has ever before existed in that same table.
I imagine that the current lack of support for it in bun was due to the default mechanism being able to fulfil most of the requirements you'd have for an autoincremented column. You're right in that it'd make sense if bun:",autoincrement" created the sequence instead of silently falling back to ROWID.
Looks like a small change, I'll try to come up with a PR for this.
* refactor: delegate autoincrement to dialects
* feat: support AUTOINCREMENT PKs in SQLite
* chore: use succinct syntax
* refactor: push the check for PK to the caller
#929
generated create table sql is:
there is no " autoincrement "
The text was updated successfully, but these errors were encountered: