Error: The field "phone_number" does not exist in the "user" schema
First things first. I'm new to better-auth and drizzle. So advanced sorry if I'm doing anything dumb
I'm getting the above error when I try to sign up my user, even when my "user" schema does have the "phone_number" field. Below is the
Below is my Better-Auth client
I also have specified
My DB is in Neon, and even in Neon Cloud, I can see the "phone_number" field (attached)
What am I missing here?
I'm getting the above error when I try to sign up my user, even when my "user" schema does have the "phone_number" field. Below is the
user schemaBelow is my Better-Auth client
I also have specified
additionalFields in the auth instanceMy DB is in Neon, and even in Neon Cloud, I can see the "phone_number" field (attached)
What am I missing here?

Solution
issue was in the
user schema. I declared the phoneNumber field as "phone_number" where both the names should be identical. I'm surprised why this didn't show a ts error if this isn't allowed. and why bunx @better-auth/cli generate command generated schema also had the same issue in many fields like createdAt and updatedAt