I am using Prisma 2 as my ORM and it is generating a typescript type for me along with the migration. The problem is that the id field (with the @id decorator) has to be required and so that translates into TS and the compiler makes me pass in the id. But the id is a bigint and so it should increment itself. I have already tried altering the type manually but then I have to rewrite it every time i migrate. I already have the same schema on one other model and that works just fine. I can't seem to figure out why
my schema.prisma User model:
model User {
id Int @id @unique @default(autoincrement())
first_name String @db.VarChar(20)
middle_name String? @db.VarChar(20)
last_name String @db.VarChar(50)
email String? @db.VarChar(50)
date_of_birth DateTime @db.Date
posts Post[]
password String
sessionSecret String
}