jonasmerlin
Explore posts from serversPPrisma
•Created by jonasmerlin on 5/13/2024 in #help-and-questions
Giving relation implicit name explicitly without dropping table
Hey! So I had a relation between model A and B for a long time now. I haven't named it explicitly. Now I want to add a second relation between the same two models, A and B. To do this, I need to name both relations explicitly, using the
@relation
attribute.
But when I then do prisma db push
it informs me that it needs to drop the table "_AtoB", even though that relation table is not empty.
Of course, I don't want to do that! But trying to explictily name the table "_AtoB" doesn't seem to help. It still informs me of the same thing. What are my options here?2 replies
TTCTheo's Typesafe Cult
•Created by jonasmerlin on 12/5/2023 in #questions
Creating other model when User is created by next-auth
So I'm integrating with Shopify and need to persist some info that is flying around during the oauth process. Where should I do that? Inside the
userinfo
config? Or should I create my own DB adapter that for the most part passes everything through to the prisma adapter?2 replies
TTCTheo's Typesafe Cult
•Created by jonasmerlin on 11/15/2023 in #questions
createServerSideHelpers() and createInnerTRPCContext()
Hey so I want to use
createServerSideHelpers
to pre-hydrate a query in a server side page. The context expects a req
object of type NextApiRequest
, but I don't have that inside GetServerSideProps
. What should I be doing?2 replies
TTCTheo's Typesafe Cult
•Created by jonasmerlin on 3/14/2023 in #questions
Always redirect to same route when logging in
Hey, I'm using the full T3 Stack. How do I tell NextAuth to redirect to a certain route when logging in/signing up? Right now, it redirects to the route I was on when I logged out.
2 replies
TTCTheo's Typesafe Cult
•Created by jonasmerlin on 2/22/2023 in #questions
Type error when using react-hook-form submit handler
17 replies
TTCTheo's Typesafe Cult
•Created by jonasmerlin on 2/9/2023 in #questions
Migrating DB in Dockerfile from Docs
So I have a fresh T3 app with all things enabled. I set up Docker the way it is described in the docs and it works. Only the DB migration seems to be missing from the Dockerfile and I can't quite figure out where to put it.
For now I want to use sqlite inside the Docker container as well. Any pointers on how to set this up?
3 replies
TTCTheo's Typesafe Cult
•Created by jonasmerlin on 2/7/2023 in #questions
What are you using for authorization?
Hey, so I got started on the "full" T3 stack recently and I'm wondering what everyone here is using for authorization?
7 replies
How are people handling authorization?
I noticed that with V10, any mentions of
trpc-shield
are gone from the documentation. Also, it only has 200 stars on GH, which is not that much when compared to tRPC itself. So I would be interested in how you're are handling authorization when using tRPC?16 replies