TRPC still looks for old column name after renaming

So I updated my prisma schema and also renamed my column in my table. But somehow I still get an TRPC which says that the column name is wrong.
TRPCClientError:
Invalid `prisma.customer.create()` invocation:

Unknown arg `customer_number` in data.customer_number for type CustomerCreateInput. Did you mean `customerNumber`?
Argument customerNumber for data.customerNumber is missing.

Note: Lines with + are required, lines with ? are optional.
TRPCClientError:
Invalid `prisma.customer.create()` invocation:

Unknown arg `customer_number` in data.customer_number for type CustomerCreateInput. Did you mean `customerNumber`?
Argument customerNumber for data.customerNumber is missing.

Note: Lines with + are required, lines with ? are optional.
10 Replies
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
utdev
utdev•3y ago
Did that no change Also after changing the schema file, do I not just run npx prisma migrate to reflect the change? npx prisma migrate dev
Piotrek
Piotrek•3y ago
Try doing npx prisma generate Btw... it's not tRPC, but prisma
utdev
utdev•3y ago
Ran npx prisma generate no success
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
utdev
utdev•3y ago
prisma studio shows the change correct db address is the same, just removed the only session from the db and refreshed my page and got logout 😄
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
utdev
utdev•3y ago
Restarting again now ok I think it worked now? dunno what was the actual change that fixed that Probably
npx prisma db push
npx prisma db push
With the restart? not sure, do you have to restart after running that command?
Piotrek
Piotrek•3y ago
Oh, i think you actually have to restart most of the times At least I'm used to restarting the dev server after making prisma changes
utdev
utdev•3y ago
nice thank you both, ill remember that
Want results from more Discord servers?
Add your server