gaurav1998
gaurav1998
Explore posts from servers
KPCKevin Powell - Community
Created by gaurav1998 on 7/3/2024 in #front-end
Why does this background image appear as 180px wide?
transform-origin: left fixed it! The problem was actually that I scaled the image by 2 first and then didn't like how it created horizontal scroll. Thus, to eliminate the horizontal scroll and bring the width down from 720px to 360px I applied a width of 50%. I think the better approach for next time would be to use overflow-x-hidden for a wrapper to eliminate the horizontal scroll
3 replies
PPrisma
Created by gaurav1998 on 6/3/2024 in #help-and-questions
Field excluded when running prisma query to supabase
Wow. Fixed: just had to close and open vs code
6 replies
PPrisma
Created by gaurav1998 on 6/3/2024 in #help-and-questions
Field excluded when running prisma query to supabase
6 replies
PPrisma
Created by charley on 6/2/2024 in #help-and-questions
Why can't I access profile in user? (ORM) (Postgres)
@charley I am getting the same exact issue as well. Are you using supabase by any chance?
7 replies
PPrisma
Created by gaurav1998 on 6/3/2024 in #help-and-questions
Field excluded when running prisma query to supabase
For more context, I have the following schema:
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}

generator client {
provider = "prisma-client-js"
}

model Service {
id Int @id @default(autoincrement())
html String
editor_state String
created_at DateTime @default(now())
updated_at DateTime @updatedAt
name String
slug String
card_title String
card_description String
}

model User {
id Int @id @default(autoincrement())
email String @unique
password String @default("$2a$10$cQEFiUaWpFvVVO5AcV3QN.7ohJXxxOPouTxORiZP.mUhupwEpDnUy")
created_at DateTime @default(now())
updated_at DateTime @default(now()) @updatedAt
name String
}
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}

generator client {
provider = "prisma-client-js"
}

model Service {
id Int @id @default(autoincrement())
html String
editor_state String
created_at DateTime @default(now())
updated_at DateTime @updatedAt
name String
slug String
card_title String
card_description String
}

model User {
id Int @id @default(autoincrement())
email String @unique
password String @default("$2a$10$cQEFiUaWpFvVVO5AcV3QN.7ohJXxxOPouTxORiZP.mUhupwEpDnUy")
created_at DateTime @default(now())
updated_at DateTime @default(now()) @updatedAt
name String
}
6 replies
PPrisma
Created by gaurav1998 on 6/3/2024 in #help-and-questions
Field excluded when running prisma query to supabase
Interestingly enough, when I drop the example column and then push, and then run this:
const user = await prisma.user.findFirst({
where: { email: email },
select: {
id: true,
email: true,
password: true,
},
});
const user = await prisma.user.findFirst({
where: { email: email },
select: {
id: true,
email: true,
password: true,
},
});
I get the following:
Failed to fetch user: PrismaClientValidationError:
Invalid `prisma.user.findFirst()` invocation:

{
where: {
},
select: {
id: true,
email: true,
password: true,
~~~~~~~~
? name?: true,
? example?: true
}
}
Failed to fetch user: PrismaClientValidationError:
Invalid `prisma.user.findFirst()` invocation:

{
where: {
},
select: {
id: true,
email: true,
password: true,
~~~~~~~~
? name?: true,
? example?: true
}
}
Which means it's still expecting the example field. Why could that be?
6 replies
PPrisma
Created by gaurav1998 on 5/29/2024 in #help-and-questions
npx prisma migrate dev --name init from tutorial not working
Hey @Nurul that solution works! So does this mean I won't be using the connection pooler?
8 replies
DTDrizzle Team
Created by patrick on 5/23/2024 in #help
I made a change, yet generate says "No schema changes, nothing to migrate"
I get the same issue
4 replies