prisma-client-rust icon indicating copy to clipboard operation
prisma-client-rust copied to clipboard

BigInt doesn't seem to work as an autoincrement id

Open HuakunShen opened this issue 1 year ago • 0 comments

model User {
  id   BigInt @id @default(autoincrement())
  name String
}
let client: PrismaClient = PrismaClient::_builder()
        .with_url("file:xc-dev.sqlite".to_string())
        .build()
        .await
        .unwrap();
client._db_push().await.unwrap();
client.user_().create("name".to_string(), vec![]).exec().await.unwrap();

This will fail. But if I change the BigInt to Int, it works.

HuakunShen avatar Nov 05 '23 22:11 HuakunShen