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
When I use id integer not null primary key autoincrement in sqlite, I have to use i32 in Rust but I want to have i64 because I have a lot of records, but when I write id bigint not null primary key autoincrement I get:
error: AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY
This is a syntactic limitation of sqlite but sqlite stores all integers as arbitrary precision anyway, so it would be possible for diesel to also allow mapping integer to i64.
It would be very useful!
Also, it doesn't let me use u64 for size_bytes unsigned bigint not null, only i64...
The text was updated successfully, but these errors were encountered:
This has been raised before, and we decided to keep things as they are for reasons I laid out in #852 (comment). If you need i64 keys, you can use table! or diesel print-schema and specify that the id column is of type BigInt there, but I don't think we should change the behavior of schema inference for the reasons I laid out in the previous comment.
When I use
id integer not null primary key autoincrement
in sqlite, I have to usei32
in Rust but I want to havei64
because I have a lot of records, but when I writeid bigint not null primary key autoincrement
I get:This is a syntactic limitation of sqlite but sqlite stores all integers as arbitrary precision anyway, so it would be possible for diesel to also allow mapping integer to
i64
.It would be very useful!
Also, it doesn't let me use
u64
forsize_bytes unsigned bigint not null
, only i64...The text was updated successfully, but these errors were encountered: