Robin Diddams
05/25/2022, 6:02 PMschema.prisma
? if you have, say, 10 different microservices, that want access to your db, how would you synchronize and version the schema across all of them?Berian Chaiwa
05/25/2022, 10:16 PMmodel IndicatorUnit {
id String @id @default(uuid()) @db.Uuid
unit String @unique
display_name String @unique
indicators Indicator[]
@@map("indicator_unit")
}
model Indicator {
id String @id @default(uuid()) @db.Uuid
report_type_id String
indicator_unit_id String
indicator_unit IndicatorUnit @relation(fields: [indicator_unit_id], references: [id])
@@map("indicator")
}
Rahul Taing
05/25/2022, 11:14 PMMischa
05/26/2022, 12:03 AM"q & a"
and want to escape that to not mean and
Mischa
05/26/2022, 12:04 AMMischa
05/26/2022, 12:07 AMsearch Unsupported("tsvector")?
and then the GIN index in the migration. when I run migrations though it creates a new migration that tries to drop my GIN indexes. the docs say "You can continue using Prisma Migrate as you were before, it will ignore indexes that it doesn't know about." am I missing a step?
also I can't search on my tsvector column; it doesn't appear in my generated schemaMischa
05/26/2022, 12:55 AM{ body: { search: "foo bar"} }
I get an error syntax error in tsquery
- if my search string contains a space
it works if I do query.split(/\s+/).join(" & ")
but that seems goofyDebaucus
05/26/2022, 12:59 AMawait prisma.X.findUnique
with X being the changing variable.
OR, is this a database stucture issue and I need to rethink my design?Studywithdesign
05/26/2022, 1:30 AMStudywithdesign
05/26/2022, 1:30 AMStudywithdesign
05/26/2022, 1:31 AMDebaucus
05/26/2022, 3:02 AMDebaucus
05/26/2022, 3:02 AMServer_type_1:
- title
- description
- name
- id
- custom thing 1
- custom thing 2
- custom thing x
Server_type_2:
- title
- description
- name
- id
- custom thing 1
- custom thing 2
- custom thing x
Currently, using postgresql, I'm not understanding how I could load all these options under one URL with NextJS/Prisma. Since I have to specify a table like Server_type_1
for example?Berian Chaiwa
05/26/2022, 5:59 PMchkpass
which can be handy for storing passwords but I noticed in the Prisma docs that unsupported data types will not be part of the generated client. Does Prisma have a model-level helper to achieve something similar?Rahul Taing
05/26/2022, 9:14 PMDimitri Borgers
05/27/2022, 4:47 AMNaoki Watanabe
05/27/2022, 8:26 AMAbhishek Sanghani
05/27/2022, 11:15 AMDeepak Guptha S
05/27/2022, 12:05 PMnest start -w
I have already tried with deleting and reinstalling the node_modules
I defined prisma schema
generator client {
provider = "prisma-client-js"
output = "./generated/client"
}
How to resolve the issue ?Sönke Peters
05/27/2022, 3:42 PMKeshav Tangri
05/28/2022, 3:58 AMVivek Poddar
05/28/2022, 9:07 AM"@prisma/client did not initialize yet. Please run \"prisma generate\" and try to import it again.\nIn case this error is unexpected for you, please report it in <https://github.com/prisma/prisma/issues>",
I have checked and can see @prisma/client
in the ./node_modules
not sure what is missingGeebrox
05/28/2022, 10:13 AMdelete
method.
await this.prismaService.task.delete({ where: { name } });
name
field is uniqueJoseph
05/28/2022, 10:39 AMSamuel Corsi-House
05/28/2022, 1:44 PM{ reason: string; moderator: string }[]
Alain Dwight
05/28/2022, 1:50 PMAlain Dwight
05/28/2022, 1:51 PMAlain Dwight
05/28/2022, 1:54 PMVivek Poddar
05/28/2022, 2:53 PMclass PrismaClient {
constructor() {
throw new Error(
`@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
In case this error is unexpected for you, please report it in <https://github.com/prisma/prisma/issues>`,
)
}
}
module.exports = {
PrismaClient,
}
Ezekiel Adetoro
05/28/2022, 9:45 PM