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-orm/sqlite-core";// you can customize integer mode to be timestamp, timestamp_msinteger('id', { mode: 'timestamp_ms' })integer('id', { mode: 'timestamp' }) // Date
import { integer, sqliteTable } from "drizzle-orm/sqlite-core";// you can customize integer mode to be timestamp, timestamp_msinteger('id', { mode: 'timestamp_ms' })integer('id', { mode: 'timestamp' }) // Date
My assumption is the following:
-
timestamp_ms
timestamp_ms
: Stores the timestamp including the milliseconds. Same precision as Date.now(). Equivalent to TIMESTAMP in MySQL. -
timestamp
timestamp
: Stores the date only. Same precision as 2023-08-09. Equivalent to DATE in MySQL.
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-...