Papa Johns
Papa Johns
Explore posts from servers
PPrisma
Created by Papa Johns on 9/7/2024 in #help-and-questions
Prisma SQLite
I want to insert the default data in database so that I could use a find query that would provide all the data in that table prepopulated and I could use that information to manipulate my information
6 replies
PPrisma
Created by Papa Johns on 9/7/2024 in #help-and-questions
Prisma SQLite
So like when an app start, there some default internal data that needs to be inserted in the database to use that while inserting other information which will be provided by users.
6 replies
PPrisma
Created by Shashank on 9/7/2024 in #help-and-questions
Supabase postgres not working sometime
for no timeout
10 replies
PPrisma
Created by Shashank on 9/7/2024 in #help-and-questions
Supabase postgres not working sometime
or setting it to 0?
10 replies
PPrisma
Created by Shashank on 9/7/2024 in #help-and-questions
Supabase postgres not working sometime
might help
10 replies
PPrisma
Created by Shashank on 9/7/2024 in #help-and-questions
Supabase postgres not working sometime
try providing the connection timeout in the database connection URL &connect_timeout=10
10 replies
PPrisma
Created by Borcio on 4/24/2024 in #help-and-questions
Problem with first connection to database
I think that might help.
31 replies
PPrisma
Created by Borcio on 4/24/2024 in #help-and-questions
Problem with first connection to database
And also check if the db url has required parameters for the connection like keepAlive etc.
31 replies
PPrisma
Created by Borcio on 4/24/2024 in #help-and-questions
Problem with first connection to database
you can try something like this
31 replies
PPrisma
Created by Borcio on 4/24/2024 in #help-and-questions
Problem with first connection to database
import { PrismaClient } from '@prisma/client'

declare global {
// eslint-disable-next-line no-var, no-unused-vars
var cachedPrisma: PrismaClient
}

let prisma: PrismaClient
if (process.env.NODE_ENV === 'production') {
prisma = new PrismaClient()
} else {
if (!global.cachedPrisma) {
global.cachedPrisma = new PrismaClient()
}
prisma = global.cachedPrisma
}

export const db = prisma
import { PrismaClient } from '@prisma/client'

declare global {
// eslint-disable-next-line no-var, no-unused-vars
var cachedPrisma: PrismaClient
}

let prisma: PrismaClient
if (process.env.NODE_ENV === 'production') {
prisma = new PrismaClient()
} else {
if (!global.cachedPrisma) {
global.cachedPrisma = new PrismaClient()
}
prisma = global.cachedPrisma
}

export const db = prisma
31 replies
PPrisma
Created by Borcio on 4/24/2024 in #help-and-questions
Problem with first connection to database
you might have to check if the prisma instance is accessible for hat file.
31 replies
PPrisma
Created by Borcio on 4/24/2024 in #help-and-questions
Problem with first connection to database
it can be that that, the connection is not happening for that particular file or execution
31 replies
PPrisma
Created by Borcio on 4/24/2024 in #help-and-questions
Problem with first connection to database
okay
31 replies
PPrisma
Created by Borcio on 4/24/2024 in #help-and-questions
Problem with first connection to database
can you check if it is connecting to the database
31 replies
PPrisma
Created by Borcio on 4/24/2024 in #help-and-questions
Problem with first connection to database
from the env
31 replies
PPrisma
Created by Borcio on 4/24/2024 in #help-and-questions
Problem with first connection to database
I think it is not able to fetch the db creds
31 replies
TTCTheo's Typesafe Cult
Created by Papa Johns on 12/23/2023 in #questions
Why do I have to delete everything when creating a new project using t3?
Good Suggestion Sir.
9 replies
TTCTheo's Typesafe Cult
Created by Papa Johns on 12/23/2023 in #questions
Why do I have to delete everything when creating a new project using t3?
While replacing them
9 replies
TTCTheo's Typesafe Cult
Created by Papa Johns on 12/23/2023 in #questions
Why do I have to delete everything when creating a new project using t3?
that option shows some issues with .git directory.
9 replies
TTCTheo's Typesafe Cult
Created by Papa Johns on 12/23/2023 in #questions
Why do I have to delete everything when creating a new project using t3?
I'd rather use the base NextJS framework than use t3 that keeps on telling me to empty the directory.
9 replies