How to configure custom ID column names (e.g., id_user, id_session) ?
Hello everyone,
I'm trying to customize the ID column names in my database schema. By default, better-auth uses
I attempted to configure this in the
However, I'm getting the following TypeScript error on the
It seems the
Is it possible to configure better-auth to use custom ID column names like
Thanks in advance for your help!
I'm trying to customize the ID column names in my database schema. By default, better-auth uses
id for the user table, id for the session table, etc. I'd like to use id_user, id_session, etc., instead.I attempted to configure this in the
auth.ts file like this :However, I'm getting the following TypeScript error on the
id_user: "id_user" line:It seems the
fields property only allows mapping predefined fields like name, email, etc., but not the id field itself.Is it possible to configure better-auth to use custom ID column names like
id_user?Thanks in advance for your help!