t3-oss / create-t3-turbo

Clean and simple starter repo using the T3 Stack along with Expo React Native
https://turbo.t3.gg
MIT License
4.27k stars 350 forks source link

bug: can't use sql in $onUpdateFn, value.toISOString is not a function #1082

Open trevorpfiz opened 5 days ago

trevorpfiz commented 5 days ago

Provide environment information

System: OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa) CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor Memory: 3.74 GB / 9.72 GB Container: Yes Shell: 5.8 - /usr/bin/zsh Binaries: Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm pnpm: 9.2.0 - ~/.nvm/versions/node/v20.12.2/bin/pnpm bun: 1.0.29 - ~/.bun/bin/bun

Describe the bug

tRPC Error on 'post.update'  [TRPCError: value.toISOString is not a function] {
  code: 'INTERNAL_SERVER_ERROR',
  name: 'TRPCError'
}

It seems that we can't use sql in $onUpdateFn? Did this used to work? https://github.com/drizzle-team/drizzle-orm/issues/2212#issuecomment-2114083803

Link to reproduction

https://github.com/t3-oss/create-t3-turbo

To reproduce

Update a post

Additional information

No response

necmettindev commented 5 days ago

@trevorpfiz looks not related with this repo. am i missing something?

trevorpfiz commented 3 days ago

@trevorpfiz looks not related with this repo. am i missing something?

https://github.com/t3-oss/create-t3-turbo/blob/791c06f64f736bb28eeab832e848ae812a67066f/packages/db/src/schema.ts#L22