SQLite: timestamp vs timestamp_ms modes
The SQLite column types docs mention there's multiple modes for integers.
What's the difference between timestamp_ms and timestamp modes?
My assumption is the following:
-
timestamp_ms
: Stores the timestamp including the milliseconds. Same precision as Date.now(). Equivalent to TIMESTAMP in MySQL.
- timestamp
: Stores the date only. Same precision as 2023-08-09. Equivalent to DATE in MySQL.
https://github.com/drizzle-team/drizzle-orm/discussions/1007GitHub
SQLite:
timestamp
vs timestamp_ms
modes · drizzle-team drizzle-...The SQLite column types docs mention there's multiple modes for integers. What's the difference between timestamp_ms and timestamp modes? import { integer, sqliteTable } from "drizzle-...
6 Replies
I've answered on GH.
Thanks!
How to make default values inside of database and not as
() => new Date()
SQLite column types – DrizzleORM
Drizzle ORM | %s
does it work with integer?
yes.
timestamp: integer("timestamp").default(sql
CURRENT_TIMESTAMP),