Sorry for my english. I'm using the discord social provider to sign into my web application but the discord id is missing. So I want to add and here's what I have :
// ...export const user = pgTable("user", { id: text("id").primaryKey(), name: text("name").notNull(), email: text("email").notNull().unique(), emailVerified: boolean("email_verified").default(false).notNull(), image: text("image"), createdAt: timestamp("created_at") .$defaultFn(() => new Date()) .notNull(), updatedAt: timestamp("updated_at") .$defaultFn(() => new Date()) .$onUpdate(() => new Date()) .notNull(), discordId: text("discord_id").unique(),// ...});
// ...export const user = pgTable("user", { id: text("id").primaryKey(), name: text("name").notNull(), email: text("email").notNull().unique(), emailVerified: boolean("email_verified").default(false).notNull(), image: text("image"), createdAt: timestamp("created_at") .$defaultFn(() => new Date()) .notNull(), updatedAt: timestamp("updated_at") .$defaultFn(() => new Date()) .$onUpdate(() => new Date()) .notNull(), discordId: text("discord_id").unique(),// ...});
The field "discord_id" is now in the db but I don't know how to add the data into the session object (data that I can grab manually). My first thought was using callbacks but none of them does the job.