-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
drizzle-team/drizzle-orm-docs
#606Labels
docsImprovements or additions to documentationImprovements or additions to documentationdocs/incorrect
Description
What version of drizzle-orm
are you using?
0.33.0
What version of drizzle-kit
are you using?
0.24.0
Describe the Bug
On this page, the documentation to store timestamps in sqlite with millisecond precision uses this as the example:
timestamp2: integer('timestamp2', { mode: 'timestamp_ms' })
.notNull()
.default(sql`(unixepoch() * 1000)`),
But this just stores the timestamp at second precision and adds 3 zeroes to the end. In order to get the timestamp to store at subsecond precision, you must change the default value to this:
timestamp2: integer('timestamp2', { mode: 'timestamp_ms' })
.notNull()
.default(sql`(unixepoch('subsecond') * 1000)`),
This isn't a serious bug, just an issue with the documentation.
Expected behavior
Simple documentation update.
Environment & setup
drizzle orm website.
Metadata
Metadata
Assignees
Labels
docsImprovements or additions to documentationImprovements or additions to documentationdocs/incorrect