RaphaelEtim
RaphaelEtim
PPrisma
Created by SmashingQuasar on 10/16/2024 in #help-and-questions
What is the best practice to deploy migrations to production on AWS RDS?
Hi @Yetzederixx Please take a look at this documentation for deploying to Production. This other doc might also interest you.
6 replies
PPrisma
Created by sommeeeR on 10/19/2024 in #help-and-questions
Lambda Layer
Hi @sommeeeR I believe you are looking for this documntation on deploying Prisma with AWS lambda
4 replies
PPrisma
Created by depr1t on 10/17/2024 in #help-and-questions
How to create a field in model that only exist on the application layer
Hi @depr1t We do not have this feature. Can you create a feature request for it? What we do have is the @ignore decorator you add to a field that you want to exclude from Prisma Client.
2 replies
PPrisma
Created by Josef Henryson on 10/17/2024 in #help-and-questions
prisma migrate dev - data lost
Can you try using Expand and Contract pattern to evolve the schema without downtime?
10 replies
PPrisma
Created by Josef Henryson on 10/17/2024 in #help-and-questions
prisma migrate dev - data lost
Hi @Josef Henryson Did you recently make any changes to your Prisma schema, such as removing fields or altering primary keys? Also, can you confirm you this question when you run npx prisma migrate dev?
10 replies
PPrisma
Created by Panic on 10/13/2024 in #help-and-questions
Kinde + Prisma ORM
Hi @Panic Did you run npx prisma generate after creating your schema? Can you also share the relevant part of the schema file?
5 replies
PPrisma
Created by harrishawker on 10/13/2024 in #help-and-questions
The relation field on model is missing an opposite relation field on the model
While for one to many self relation, this can also work
enum Sex {
suspected_male
suspected_female
male
female
intersex
unknown
}

model Animal {
id Int @id @default(autoincrement())
species String @db.VarChar(255)
spcies_scientific_name String @db.VarChar(255)
age String @db.VarChar(255)
dob DateTime?
sex Sex

mother Animal? @relation(name: "Mother", fields: [motherId], references: [id])
motherId Int? // relation scalar field (used in the `@relation` attribute above)
motheredAnimal Animal[] @relation(name: "Mother") // opposite relation field

father Animal? @relation(name: "Father", fields: [fatherId], references: [id])
fatherId Int? // relation scalar field (used in the `@relation` attribute above)
fatheredAnimal Animal[] @relation(name: "Father") // opposite relation field
}
enum Sex {
suspected_male
suspected_female
male
female
intersex
unknown
}

model Animal {
id Int @id @default(autoincrement())
species String @db.VarChar(255)
spcies_scientific_name String @db.VarChar(255)
age String @db.VarChar(255)
dob DateTime?
sex Sex

mother Animal? @relation(name: "Mother", fields: [motherId], references: [id])
motherId Int? // relation scalar field (used in the `@relation` attribute above)
motheredAnimal Animal[] @relation(name: "Mother") // opposite relation field

father Animal? @relation(name: "Father", fields: [fatherId], references: [id])
fatherId Int? // relation scalar field (used in the `@relation` attribute above)
fatheredAnimal Animal[] @relation(name: "Father") // opposite relation field
}
motheredAnimal and fatheredAnimal are the opposite relation fields for mother and father, respectively. This ensures that the relations are properly defined and bidirectional. You can choose any name that best fit your application's domain.
5 replies
PPrisma
Created by harrishawker on 10/13/2024 in #help-and-questions
The relation field on model is missing an opposite relation field on the model
Hi @harrishawker 👋 Are you trying to create a one to one self relation or a one to many self relation? For one to one self relation, this could work
enum Sex {
suspected_male
suspected_female
male
female
intersex
unknown
}

model Animal {
id Int @id @default(autoincrement())
species String @db.VarChar(255)
spcies_scientific_name String @db.VarChar(255)
age String @db.VarChar(255)
dob DateTime?
sex Sex

mother Animal? @relation(name: "Mother", fields: [motherId], references: [id])
motherId Int? @unique // relation scalar field (used in the `@relation` attribute above)
motheredAnimal Animal? @relation(name: "Mother") // opposite relation field

father Animal? @relation(name: "Father", fields: [fatherId], references: [id])
fatherId Int? @unique // relation scalar field (used in the `@relation` attribute above)
fatheredAnimal Animal? @relation(name: "Father") // opposite relation field
}
enum Sex {
suspected_male
suspected_female
male
female
intersex
unknown
}

model Animal {
id Int @id @default(autoincrement())
species String @db.VarChar(255)
spcies_scientific_name String @db.VarChar(255)
age String @db.VarChar(255)
dob DateTime?
sex Sex

mother Animal? @relation(name: "Mother", fields: [motherId], references: [id])
motherId Int? @unique // relation scalar field (used in the `@relation` attribute above)
motheredAnimal Animal? @relation(name: "Mother") // opposite relation field

father Animal? @relation(name: "Father", fields: [fatherId], references: [id])
fatherId Int? @unique // relation scalar field (used in the `@relation` attribute above)
fatheredAnimal Animal? @relation(name: "Father") // opposite relation field
}
5 replies
PPrisma
Created by realspinelle on 10/10/2024 in #help-and-questions
Error: P1001: Can't reach database server at localhost:5432
db push command in Prisma creates the db if it does not exist. https://www.prisma.io/docs/orm/reference/prisma-cli-reference#db-push
60 replies
PPrisma
Created by realspinelle on 10/10/2024 in #help-and-questions
Error: P1001: Can't reach database server at localhost:5432
So i can raise an issue with our engineering team
60 replies
PPrisma
Created by realspinelle on 10/10/2024 in #help-and-questions
Error: P1001: Can't reach database server at localhost:5432
I want to see if it gives the same error
60 replies
PPrisma
Created by realspinelle on 10/10/2024 in #help-and-questions
Error: P1001: Can't reach database server at localhost:5432
can you try bunx prisma db push?
60 replies
PPrisma
Created by realspinelle on 10/10/2024 in #help-and-questions
Error: P1001: Can't reach database server at localhost:5432
you would need to have done a prisma db push or prisma migrate dev
60 replies
PPrisma
Created by realspinelle on 10/10/2024 in #help-and-questions
Error: P1001: Can't reach database server at localhost:5432
once you get the logs, please paste it here. Thanks
60 replies
PPrisma
Created by realspinelle on 10/10/2024 in #help-and-questions
Error: P1001: Can't reach database server at localhost:5432
60 replies
PPrisma
Created by realspinelle on 10/10/2024 in #help-and-questions
Error: P1001: Can't reach database server at localhost:5432
You can use this command line statement to add debugging to it
export DEBUG="*"
export DEBUG="*"
60 replies
PPrisma
Created by realspinelle on 10/10/2024 in #help-and-questions
Error: P1001: Can't reach database server at localhost:5432
Can you share the repository with me
60 replies
PPrisma
Created by realspinelle on 10/10/2024 in #help-and-questions
Error: P1001: Can't reach database server at localhost:5432
Can you try connecting to a database client like TablePlus https://tableplus.com/
60 replies
PPrisma
Created by realspinelle on 10/10/2024 in #help-and-questions
Error: P1001: Can't reach database server at localhost:5432
Can you probably try restarting the system to see if it helps resolve the issue?
60 replies
PPrisma
Created by realspinelle on 10/10/2024 in #help-and-questions
Error: P1001: Can't reach database server at localhost:5432
The connection string looks correct. Is a VPN being used?
60 replies