fractionals...

This commit is contained in:
Niki Wix Skaarup 2025-04-06 02:53:08 +02:00
parent ab55966598
commit 170a019bca
Signed by: nikiskaarup
GPG key ID: FC2F1B116F6E788C
4 changed files with 105 additions and 2 deletions

View file

@ -3,11 +3,11 @@ import { index, integer, primaryKey, sqliteTable, text } from 'drizzle-orm/sqlit
const createdAt = integer('created_at', { mode: 'timestamp_ms' })
.notNull()
.default(sql`(unixepoch('subsec'))`)
.default(sql`(unixepoch('subsec') * 1000)`)
.$defaultFn(() => new Date());
const updatedAt = integer('updated_at', { mode: 'timestamp_ms' })
.notNull()
.default(sql`(unixepoch('subsec'))`)
.default(sql`(unixepoch('subsec') * 1000)`)
.$onUpdateFn(() => new Date());
export const entry = sqliteTable(