© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
2 replies
peachneo

UpdatedAt column - Postgres

What's the best practice way to achieve a standard "updatedAt" column with the pg wrapper?

I've seen mysql has
timestamp('updated_at').defaultNow().onUpdateNow().notNull()
timestamp('updated_at').defaultNow().onUpdateNow().notNull()


However onUpdateNow() doesn't appear to be there for pg.
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Right way to make UpdatedAt column in Drizzle?
Drizzle TeamDTDrizzle Team / help
2y ago
Rename conflicted column (postgres)
Drizzle TeamDTDrizzle Team / help
2y ago
Generate column from another column postgresql
Drizzle TeamDTDrizzle Team / help
3y ago
instanceof postgres.PostgresError not working
Drizzle TeamDTDrizzle Team / help
9mo ago