We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
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? drizzle-team/drizzle-orm#2212 (comment)
$onUpdateFn
https://github.com/t3-oss/create-t3-turbo
Update a post
No response
The text was updated successfully, but these errors were encountered:
@trevorpfiz looks not related with this repo. am i missing something?
Sorry, something went wrong.
create-t3-turbo/packages/db/src/schema.ts
Line 22 in 791c06f
still an issue.drizzle-team/drizzle-orm#2212 works with mode: string when update db.
mode: string
I encounter the same question and solve it by changing the callback to:
updatedAt: timestamp("updated_at", { mode: "date", withTimezone: true, }).$onUpdateFn(() => new Date()),
See also drizzle-team/drizzle-orm#1113 drizzle-team/drizzle-orm#2212
No branches or pull requests
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
It seems that we can't use sql in
$onUpdateFn
? Did this used to work? drizzle-team/drizzle-orm#2212 (comment)Link to reproduction
https://github.com/t3-oss/create-t3-turbo
To reproduce
Update a post
Additional information
No response
The text was updated successfully, but these errors were encountered: