How to switch from sqllite to PostgreSQL(railway.app)
I was working on an application using T3 stack and sqllite and everything was working perfectly but when I switched to PostgreSQL, it stopped working any idea whats wrong?
48 Replies
Typically you should get some type of error message. Follow the call stack
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
theres an next-dev.js?3515:20 TRPCClientError:
Invalid
prisma.expenses.create()
invocation:
i used db push after setting up the railway app
yupUnknown User•3y ago
Message Not Public
Sign In & Join Server To View
sure
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
no error
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
let me try
but this same code was working for sqllite
They're both different technologies
So there will be mismatch between both
ahhh i see
any idea how to convert?
docs or tutorial will help
I mean the error itself is telling you what's wrong. Wallet ID doesn't seem to exist there. What does your schema look like?
Also you might need to delete node_modules
and regenerate the client
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
the schema im using
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
i was following this tut
TomDoesTech
YouTube
Build a Blog With the T3 Stack - tRPC, TypeScript, Next.js, Prisma...
Repository: https://github.com/TomDoesTech/trpc-tutorial
tRPC docs: https://trpc.io/
In this video, we will build a blog with the T3 stack, tRPC, TypeScript, Next.js, Prisma & Zod. The blog will include a basic one-time password authentication strategy, and the ability to create blog posts.
0:00 Introduction
4:17 Demo
5:53 Code walk-through
20...
It's connect a record to a related record
here he used to connect 2 tables (afaik)
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Yeah you can use it in a create
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Yeah in his case
you mean w/o connect?
Yup
nope not working
I know why I think
Instead of walletId just type in Id
Because when you do connect it'll give you the wallet type not the expenses type
Wallet doesn't contain
walletId
, it'll contain id
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
i think i have to give it a wallet field here
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
umm yeah i think that is the case
because its not getting created at login
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
no problem thanks for the help
but now new problem the wallet is not getting created :///
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
GitHub
GitHub - aditya-exe/expense-tracker
Contribute to aditya-exe/expense-tracker development by creating an account on GitHub.
link to the repo
like you said the wallet is undefined it is not getting created
You're probably going to need
protectedRouter
here not the standard router
because you expect some type of user to already be in the request contextwhat do you mean by that?