Oliver
08/04/2022, 3:42 PMAuditLogEntry
. Im not sure this is 100% Prisma related but I'm curious if you believe this is viable?
Specifically, I wonder if it will be too much data if a few hundred users click around all day and create AuditLogEntry
everytime they load a page (read from a table), which they will do rather often.
Thanks!
EDIT: This is how I imagine the model to look like, to give an idea of the data size:
model AuditLogEntry {
id String @id @default(cuid())
createdAt DateTime @default(now()) @map("created_at")
authorId String @map("author_id")
author User @relation(fields: [authorId], references: [id], onDelete: Cascade)
patient Patient? @relation(fields: [patientId], references: [id], onDelete: Cascade)
patientId String? @map("patient_id")
subject Subject?
action Action?
title String
description String
@@map("audit_log_entries")
}
Michael Jay
08/04/2022, 6:15 PMJeremy H
08/04/2022, 7:49 PMprisma:error Error while querying: This request must be retried
prisma:warn This request can be retried
prisma:warn Retrying after 55ms
Jeremy H
08/04/2022, 8:33 PMJeremy H
08/04/2022, 8:33 PM///
in my Schema fileSchalk Neethling
08/04/2022, 9:21 PMTypeError: mock.mockReset is not a function
- I also initially ran into the problem of jest
not being defined but I resolved that with import { jest } from "@jest/globals";
beforeEach(() => {
mockReset(prismaMock);
});
Chris Tsongas
08/03/2022, 11:16 PMIvan Lukianchuk
08/05/2022, 12:42 AMHayley Dawson
08/05/2022, 12:44 AMsagar lama
08/05/2022, 5:12 AMNadeshi Kon
08/05/2022, 7:22 AMNadeshi Kon
08/05/2022, 7:22 AMNadeshi Kon
08/05/2022, 7:22 AMNabhag Motivaras
08/05/2022, 8:27 AMsagar lama
08/05/2022, 8:28 AMjest.spyOn(prismaService.authProvider, 'groupBy').mockResolvedValue([]);
Error
Type of property 'AND' circularly references itself in mapped type '{ [K in keyof { AND?: Enumerable<AuthProviderScalarWhereWithAggregatesInput>; OR?: Enumerable<AuthProviderScalarWhereWithAggregatesInput>; ... 4 more ...; userId?: number | IntWithAggregatesFilter; }]: Or<...> extends 1 ? { ...; }[K] extends infer TK ? GetHavingFields<...> : never : {} extends FieldPaths<...> ? neve...'.ts(2615)
How do I solve this?Tanuj Doshi
08/05/2022, 12:09 PMMichael Jay
08/05/2022, 12:11 PM<postgresql://MYUSER:MYPW@localhost/MYDB?host=%2Fcloudsql%2FMY_CLOUD_SQL_INSTANCE_CONNECTION_NAME%2F>
I tried it with and without the trailing slash, but I haven't tried it yet with removing the percent encodings.
I just would really love to hear from a Prisma team member that this is up-to-date information so I can rule one thing out and focus elsewhere.Jigar Bhaliya
08/05/2022, 12:24 PMSlackbot
08/05/2022, 1:09 PMuser
08/05/2022, 2:13 PMSchalk Neethling
08/05/2022, 7:15 PMSchalk Neethling
08/05/2022, 7:42 PMSchalk Neethling
08/05/2022, 7:44 PMSchalk Neethling
08/05/2022, 7:44 PMManuel
08/05/2022, 8:48 PMDATABASE_URL=<postgresql://username:password@project-do-user-xxxxxx-0.b.db.ondigitalocean.com>:xxxxxx/xxxxxx?sslmode=require&sslcert=ca-certificate.crt&pgbouncer=true
ca-certificate.crt is preseent in the container at the right location (prisma folder) and locally as well as on a DO droplet without Docker everything is working fine with exactly the same connection string.
Not really sure what the problem is here, maybe anyone might have an idea?Zac Webb
08/05/2022, 11:32 PMUser
-> Profile
relation but having trouble getting the data back I'm expecting π€
Does this look at all correct in terms of creating the connection between the two models? The response I'm getting from the service I'm unit testing doesn't include any information about the User
...Blake Puls
08/06/2022, 1:52 AMAdimac93
08/06/2022, 11:24 PMpackage.json
"prisma": {
"seed": "ts-node ./src/lib/database/seed.ts"
},
Adimac93
08/06/2022, 11:25 PMAdimac93
08/06/2022, 11:26 PMnpx prisma db seed