Brendonovich / prisma-client-rust

Type-safe database access for Rust
https://prisma.brendonovich.dev
Apache License 2.0
1.75k stars 106 forks source link

BigInt doesn't seem to work as an autoincrement id #411

Open HuakunShen opened 8 months ago

HuakunShen commented 8 months ago
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.