© 2026 Hedgehog Software, LLC

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

String default for integer timestamps?

Hey folks, I'm using Drizzle with SQLite on CloudFlare D1. Using the following column schema:

createdAt: integer("created_at", { mode: "timestamp" }).default(sql`CURRENT_TIMESTAMP`),
createdAt: integer("created_at", { mode: "timestamp" }).default(sql`CURRENT_TIMESTAMP`),


From the D1 database viewer I am seeing that Drizzle creates values that look like this
2024-01-03 03:55:45
2024-01-03 03:55:45
, whereas values inserted via direct SQL are integers properly e.g.
1703894400
1703894400
. In addition, the string values show up as
NULL
NULL
in Drizzle Studio. Could I be doing something wrong or have I encountered a bug?
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

Default values to integer timestamps in sqlite
Drizzle TeamDTDrizzle Team / help
3y ago
column "roles" is of type integer[] but default expression is of type integer
Drizzle TeamDTDrizzle Team / help
2y ago
integer timestamp error
Drizzle TeamDTDrizzle Team / help
3y ago