Alter default user schema, remove image field from it

Hi, is it possible to alter default user schema, from postgres i removed image field and i want to do to same in here:
export const auth = betterAuth({
database: prismaAdapter(prisma, {
provider: "postgresql",
}),
emailAndPassword: {
enabled: true,
},
socialProviders: {
github: {
clientId: envServer.GITHUB_CLIENT_ID,
clientSecret: envServer.GITHUB_CLIENT_SECRET,
},
},
export const auth = betterAuth({
database: prismaAdapter(prisma, {
provider: "postgresql",
}),
emailAndPassword: {
enabled: true,
},
socialProviders: {
github: {
clientId: envServer.GITHUB_CLIENT_ID,
clientSecret: envServer.GITHUB_CLIENT_SECRET,
},
},
3 Replies
misho
mishoOP4mo ago
model User {
id String @id
name String
email String
emailVerified Boolean
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt

sessions Session[]
accounts Account[]
}
model User {
id String @id
name String
email String
emailVerified Boolean
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt

sessions Session[]
accounts Account[]
}
I removed from here 'image' field that i dont need
Alex Booker
Alex Booker4mo ago
Just to clarify - what are you trying to accomplish exactly? If you’ve already removed the image field from your Prisma schema and applied the migration, it shouldn’t exist in the database anymore.
misho
mishoOP4mo ago
Yeah and there was some problem on client side, it was saying unable_to_create_user, now i changed a few things and there is no error anymore i still have client side access to image in code, but i dont care about that

Did you find this page helpful?