How to copy my custom user.role field into the session table?
I’m using Better Auth (with Postgres) in a Fastify/TypeScript app. I’ve extended both the users and sessions tables with an extra role column via additionalFields. On signup I inject a role into the user, but when a session is created, role in the sessions table ends up NULL and I get:
P.S. We need a Fastify tag
SERVER_ERROR: error: null value in column "role" of relation "session" violates not-null constraintP.S. We need a Fastify tag