James Pickard
09/20/2022, 9:51 AMJames Pickard
09/20/2022, 9:55 AMJames Pickard
09/20/2022, 9:55 AMNurul
09/20/2022, 12:30 PMRob
09/20/2022, 5:13 PMpublic.users
does not exist in the current database". I have the prisma schema files that are ready to update, but what command do I actually use to update the db schema? I know I need to use prisma CLI I thinkLauany Reis da Silva
09/20/2022, 6:18 PMMuhannad
09/20/2022, 6:35 PM@@index([id], map: "__SHARDKEY")
second issue:
incorrect
dateTime _DateTime_ @db.DateTime()
correct
dateTime _DateTime_ @db.DateTime(0)
Thanks in advance 🙏Jonathan Marbutt
09/20/2022, 7:32 PMcontacts
and a table addresses
. Table addresses
has a contactId
and isPrimary
. And contacts
has a primaryAddressId
in the table.
If someone updates or adds an Address that isPrimary = true
then it should set the contact’s primaryAddressId
.
So where would you as a prisma dev have this live?
• Database Trigger
• Middleware
• Just my api code?
• Somewhere else?
This is actually a part of a bigger internal discuss I have been having and was curious this community’s thoughtsVarshith Kumar
09/20/2022, 8:12 PMTaylor Lindores-Reeves
09/20/2022, 9:16 PMTaylor Lindores-Reeves
09/20/2022, 9:17 PMTri Nguyen
09/21/2022, 12:38 AMKevin Reed
09/21/2022, 1:03 AMMessage: Error in Prisma Client request:
Invalid `prisma.entry.findMany()` invocation:
Can't reach database server at `external_ipv4_redacted`:`5000`
Please make sure your database server is running at `external_ipv4_redacted`:`5000`.
Query:
{
"modelName": "Entry",
"operation": "findMany",
"args": {
"take": 100,
"skip": 0,
"select": {
"id": true
}
}
}
Nurul
09/21/2022, 6:38 AMHammedctgr
09/21/2022, 8:27 AMNurul
09/21/2022, 9:49 AMKenny Tran
09/21/2022, 11:35 AMconst [queryOne, queryTwo] = await prisma.$transaction([])
The transaction will fail if one of them fails but what happens if one of them succeed and the other fails? Will the query that succeeded actually run towards the DB even though the other query failed?Matt Langer
09/21/2022, 12:18 PMPrismaAction
referenced by MiddlewareParams
is missing the new new findFirstOrThrow
and findUniqueOrThrow
actions from the 4.0 release. Easy enough for us to patch with TS unions but thought you'd want it on your radar 🙌J R
09/21/2022, 12:51 PMdoddy nicolas
09/21/2022, 1:29 PMdoddy nicolas
09/21/2022, 1:29 PMprisma.user.findMany()
invocation:\n\n\nAuthentication failed against database server at localhost
, the provided database credentials for root
are not valid.\n\nPlease make sure to provide valid database credentials for the database server at localhost
.",
"stack": "Error: \nInvalid prisma.user.findMany()
invocation:\n\n\nAuthentication failed against database server at localhost
, the provided database credentials for root
are not valid.\n\nPlease make sure to provide valid database credentials for the database server at localhost
.\n at RequestHandler.handleRequestError (D:\\prisma\\es-app\\node_modules\\@prisma\\client\\runtime\\index.js2991513)\n at RequestHandler.request (D:\\prisma\\es-app\\node_modules\\@prisma\\client\\runtime\\index.js2989212)\n at async PrismaClient._request (D:\\prisma\\es-app\\node_modules\\@prisma\\client\\runtime\\index.js3086416)\n at async Object.users (webpack-internal:///(api)/./pages/api/graphql.ts7828)\n at async Promise.all (index 0)\n at async file///D/prisma/es-app/node_modules/@envelop/core/esm/orchestrator.js37727\n at async processRequest (file///D/prisma/es-app/node_modules/@graphql-yoga/common/esm/processRequest.js2320)\n at async YogaNodeServer.getResponse (file///D/prisma/es-app/node_modules/@graphql-yoga/common/esm/server.js31328)\n at async YogaNodeServer.YogaServer.handleRequest (file///D/prisma/es-app/node_modules/@graphql-yoga/common/esm/server.js6930)\n at async YogaNodeServer.handleIncomingMessage (file///D/prisma/es-app/node_modules/@graphql-yoga/node/esm/index.js5326)"
}
}
}
],
"data": null
}Slackbot
09/21/2022, 2:42 PMRaif Harik
09/21/2022, 3:07 PMYusuf Musa
09/21/2022, 3:36 PMPrismaClient
is not being generated. I've tried searching online and added this postinstall
script in my package.json
that does a yarn prisma generate
but I'm lost at how that all works.
For context -- I'm using Firebase Functions to schedule regular updates to update the database (Planetscale) and add new rows/prune old ones.
Not sure if the error message helps but here's what Firebase Functions returned.ven v
09/21/2022, 3:49 PMRyan Roline
09/21/2022, 5:36 PMKostas Karaolis
09/21/2022, 6:12 PMlocations: { connect: [{ id: 1 }, { id: 2 }] },
but it is not connecting the jobs with locations. any ideas what I am doing wrong?Jake W
09/21/2022, 9:14 PMNick Green
09/21/2022, 9:15 PMFishie
09/22/2022, 9:13 AMroleIds: String[]
How can I delete 1 value from many users?
await prisma.serverMember.updateMany({where: {roleIds: {has: roleId}}, data: {
roleIds: // what goes here?
}});