model Account { id String @id @default(cuid()) userId String name String type String balance Float currency String @default("USD") isDefault Boolean @default(false) creditLimit Float? dueDate DateTime? createdAt DateTime @default(now()) updatedAt DateTime @updatedAt accountNumber String? institution String? notes String? isActive Boolean @default(true) user User @relation(fields: [userId], references: [id], onDelete: Cascade) transactions Transaction[] @relation("FromAccount") transfers Transaction[] @relation("ToAccount") recurringPayments RecurringPayment[]
@@index([userId]) } this is the account but for this is not for better-auth , I need better-auth to use this model model AuthAccount { id String @id @default(cuid()) userId String accountId String providerId String password String? accessToken String? refreshToken String? idToken String? accessTokenExpiresAt DateTime? createdAt DateTime @default(now()) updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
In general I'd say you should have a section in your Prisma schema that you just always copy-paste over from the generated better auth schema instead of manually adding the columns
actually I have a table with name Account and I have built applicaiton based on that table, I thought of giving better-auth a try and I coudnt just rename my Account table . so I created another table as required by better-auth . and I couldnt able to point better-auth to use that table as account. Eventhough it was mentioned in docs
Hello, I don't know if you have solved the problem, but I found a solution. In the "Prisma" schema, add "?" like this: "name String? @db.Text" to the user model. Your users are then free to fill in the name field later. Sorry for my bad English, I use a translator.