SQLite INTEGER PRIMARY KEY
does not create Generated
type for column
#105
Labels
bug
Something isn't working
When defining a table column with
INTEGER PRIMARY KEY
in SQLite, it is an alias for the interalrowid
which basically is auto-generated each time a new row is inserted. When using kysely codegen with a defined sqlite column in a table like this, it will instead just generate the plain type (in this casenumber
). I have to explicitly use theAUTOINCREMENT
keyword in my table definition for the primary key and then the code will be generated correctly. That being said, autoincrement should not be used for reasons of being a bit more resource intensive (at least not for primary keys). I can provide examples if needed.Otherwise, thank you for the great tool. Really love it saved me so much time already.
Upvote & Fund
The text was updated successfully, but these errors were encountered: