Halvor
08/30/2021, 3:34 PMconst result1 = await prisma.map.upsert({
where: {
uuid: query.uuid
deleted: true
},
update: {
},
create: {
user: {
connect: {
id: query.userId
}
},
uuid: query.uuid
deleted: false
}
}
Eric Chen
08/30/2021, 9:44 PM2021-08-30T21:43:19.225Z [ERROR]: Error: Command failed with exit code 1: node_modules/.bin/next build
Failed to compile.
ModuleNotFoundError: Module not found: Error: Can't resolve '_http_common' in '/codebuild/output/src843141263/src/postpanion2/node_modules/@prisma/client/runtime'
> Build error occurred
Error: > Build failed because of webpack errors
at /codebuild/output/src843141263/src/postpanion2/node_modules/next/dist/build/index.js:390:19
at async Span.traceAsyncFn (/codebuild/output/src843141263/src/postpanion2/node_modules/next/dist/telemetry/trace/trace.js:60:20)
Halvor
08/30/2021, 10:19 PMWalter DÃaz
08/31/2021, 4:00 AMDev__
08/31/2021, 8:32 AMError
, does it also work if I use PrismaClientKnownRequestError
. example
catch(error) {
if (error instanceof PrismaClientKnownRequestError) { // does this also check for instance of Error since its extending Error
...
}
}
Kyle (TechSquidTV)
08/31/2021, 11:47 AMHei
08/31/2021, 11:54 AMmanuel
08/31/2021, 6:26 PMmanuel
08/31/2021, 6:26 PMBryan Migliorisi
08/31/2021, 6:36 PMProduct
in Stripe would look like prod_abcdefg
while a Customer
would have cus_abcdefg
... I know I could manually generate IDs in my code, but it would be very cool if I could do something like this in the schema
model Customer {
id String @id @default(cuid(prefix: "cus"))
}
Tyler Clendenin
08/31/2021, 9:50 PMHalvor
08/31/2021, 10:04 PMHalvor
08/31/2021, 10:31 PMconst [mapCount, mapList] = await prisma.$transaction([
prisma.user.count(),
prisma.map.findMany()
]);
Halvor
08/31/2021, 10:32 PMAustin Turner
09/01/2021, 12:29 AM@relation
?
EDIT: I figured it out, I guess that the lookup field also need to include @db.Uuid
Gelo
09/01/2021, 5:10 AMkkangsan
09/01/2021, 5:33 AMkkangsan
09/01/2021, 5:33 AMPatrick Sheehan
09/01/2021, 9:20 AMpulumi up
command, I get the follow error
error: Running program '/platform-cloud-services' failed with an unhandled exception:
Error: Remote object was not 'function': {"type":"object","className":"Function","description":"Function","objectId":"-2560291290870578958.2.6040"}
at /platform-cloud-services/node_modules/@pulumi/pulumi/runtime/closure/v8_v11andHigher.js:149:23
at Generator.next (<anonymous>)
at fulfilled (/platform-cloud-services/node_modules/@pulumi/pulumi/runtime/closure/v8_v11andHigher.js:18:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
I suspect is has something to do with the pulumi not playing well with engine, but if anyone has had success I could use the helpKay Khan
09/01/2021, 9:53 AMMykyta Machekhin
09/01/2021, 11:32 AMIttsel Ali
09/01/2021, 1:13 PMMateusz Żmijewski
09/01/2021, 2:18 PMKay Khan
09/01/2021, 3:23 PMprisma db pull
Kay Khan
09/01/2021, 3:26 PMNote that as you evolve the application, this process can be repeated for an indefinite number of times.referring to the commands
prisma db pull
and prisma generate
I wonder how that affects workflow when you want to pull again at a later date, does the manually added models (in this case the views) get deleted and you have to manually readd them?
---
I just tried this prisma db pull
will remove any manual models (views) you add to schema.prisma 😢Michael Stewart
09/01/2021, 5:35 PMset:
on an explicit many to many relation, is that possible ?? because when I try to do so I get this error:
`The change you are trying to make would violate the required relation ‘TrainersOnVenuesToTrainingVenue’ between the TrainersOnVenues
and TrainingVenue
models.`Cole Voss
09/01/2021, 5:57 PMRodrigo Scomação do Nascimento
09/01/2021, 6:58 PMRodrigo Scomação do Nascimento
09/01/2021, 6:58 PMRodrigo Scomação do Nascimento
09/01/2021, 7:00 PM