Yetzederixx
Yetzederixx
PPrisma
Created by Dario on 11/11/2024 in #help-and-questions
Issues with raw queries (was working) - Postgres
I know it'd be annoying to have a folder, and query, just for a select 1 statement... but it may be worth a shot
4 replies
PPrisma
Created by Dario on 11/11/2024 in #help-and-questions
Issues with raw queries (was working) - Postgres
I had issues with raw queries a while back, ended up switching to this instead https://www.prisma.io/docs/orm/prisma-client/using-raw-sql/typedsql I don't know if it'll solve your problem, but it did mine
4 replies
PPrisma
Created by CatNoir on 11/6/2024 in #help-and-questions
Psql Timeout connecting a new connection from collection pool
You may need to setup some kind of message broker, or something, to broadcast like that in a way that's respectful to your database heh, glad bouncer worked though.
9 replies
PPrisma
Created by CatNoir on 11/6/2024 in #help-and-questions
Psql Timeout connecting a new connection from collection pool
I'd imagine this can't help things out any. I know some chat apps seem to load like the last N messages and essentially enable "infinite scrolling" (aka paging) to get stuff in smaller chunks as the user scrolls
9 replies
PPrisma
Created by Alaskan donut on 11/3/2024 in #help-and-questions
TypedSQL: Passing null values into raw SQL?
it seems like userId isn't actually set to null prior to passing in, give it some initialization to null and see if that helps
3 replies
PPrisma
Created by loobydooby on 11/1/2024 in #help-and-questions
Filter relationship by value in parent
try someId: someValue?
6 replies
PPrisma
Created by jsoneaday on 10/31/2024 in #help-and-questions
Why is omit not available for this query?
That's a good question, do you have a specific error message you can share?
8 replies
PPrisma
Created by TheBwoyProgrammer on 10/30/2024 in #help-and-questions
Need Help with CRUD operations
You usually don't want to go ham encoding like a meg of stuff in a jwt, but in my last project I did encode the main parent objects id's as an array to make lookups and RBAC checks easier.
6 replies
PPrisma
Created by TheBwoyProgrammer on 10/30/2024 in #help-and-questions
Need Help with CRUD operations
Which user, the one making the request or the id of the record you are trying to modify? I'm guessing the former, but you never know. If it's the former that users id is often encoded into a jwt. You can encode other things in there, but the tl;dr of it is, is that if it is you can devise some permissions. eg, a user has a relation to some parent object like a company, that company has assets, therefor you check if the user has access to the parent of the record in question, and if so allow them to do stuff, if not, return a 403 is how I usually do it
6 replies
PPrisma
Created by Tomathy on 10/23/2024 in #help-and-questions
SSL connection to supabase
have you tried using the psql command line tool?
18 replies
PPrisma
Created by Tomathy on 10/23/2024 in #help-and-questions
SSL connection to supabase
The paranoid will have a pg user/password, ssl cert with password, which is fine, but not used a lot in my experience. Frankly if someone can get the cert, they've breached enough of your system that you have to assume everything is compromised anyway. So there's more to be gained shoring up security elsewhere I guess.
18 replies
PPrisma
Created by Tomathy on 10/23/2024 in #help-and-questions
SSL connection to supabase
it's basically a ssl cert without a password like you typically do to a cloud rig for remote access
18 replies
PPrisma
Created by Tomathy on 10/23/2024 in #help-and-questions
SSL connection to supabase
No, the cert replaces the identity stuff to my knowledge
18 replies
PPrisma
Created by Tomathy on 10/23/2024 in #help-and-questions
SSL connection to supabase
My recommendation is always, attempt to connect with the psql client, and in this case make sure you're in the prisma folder when you do and adjust the path until it works, then c&p that bad boy in your code
18 replies
PPrisma
Created by Tomathy on 10/23/2024 in #help-and-questions
SSL connection to supabase
Certificate paths are resolved relative to the ./prisma folder so you may have to adjust your path
18 replies
PPrisma
Created by Tomathy on 10/23/2024 in #help-and-questions
SSL connection to supabase
guess even
18 replies
PPrisma
Created by Tomathy on 10/23/2024 in #help-and-questions
SSL connection to supabase
make sure your cert is in the correct place is my guiss
18 replies
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?
yeah my db url's are injected into the docker container at build time
6 replies
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?
I use npx prisma migrate dev --name something developing locally, then I use a boot.sh script which runs on launching the new container.
#! /bin/bash

npx prisma migrate deploy
npx prisma generate --sql
npm start
#! /bin/bash

npx prisma migrate deploy
npx prisma generate --sql
npm start
6 replies