[GH-ISSUE #646] Prisma AdditionalFields Default value is not being applied #8357

Closed
opened 2026-04-13 03:25:41 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @michaelsieminski on GitHub (Nov 24, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/646

Describe the bug
When adding additionalFields to the user and defining a defaultValue, in the createUser function insstead of using the defaultValue its just using the Type such as "Boolean".

To Reproduce
Steps to reproduce the behavior:

  1. Add an additional Field to the user with a default value of false
  2. Generate the prisma schema using npx @better-auth/cli generate
  3. Run the migrations with npx prisma migrate reset
  4. Push to database using npx prisma db push
  5. Create a new user

Expected behavior
The default value should be used from the additional fields

Screenshots
CleanShot 2024-11-24 at 12 32 36@2x

Originally created by @michaelsieminski on GitHub (Nov 24, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/646 **Describe the bug** When adding additionalFields to the user and defining a defaultValue, in the createUser function insstead of using the defaultValue its just using the Type such as "Boolean". **To Reproduce** Steps to reproduce the behavior: 1. Add an additional Field to the user with a default value of false 2. Generate the prisma schema using npx @better-auth/cli generate 3. Run the migrations with npx prisma migrate reset 4. Push to database using npx prisma db push 5. Create a new user **Expected behavior** The default value should be used from the additional fields **Screenshots** ![CleanShot 2024-11-24 at 12 32 36@2x](https://github.com/user-attachments/assets/5b44cdf9-8f17-42ad-80c4-a539a1d06936)
GiteaMirror added the locked label 2026-04-13 03:25:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8357