SQLite update at column

How do you guys would write the created and updated at column schemas when using sqlite?
createdAt: text("createdAt")
.notNull()
.default(sql`(CURRENT_TIMESTAMP)`),
updatedAt: text('updatedAt')
.notNull()
.default(sql`(CURRENT_TIMESTAMP)`)
.$onUpdate(() => sql`(CURRENT_TIMESTAMP)`),
createdAt: text("createdAt")
.notNull()
.default(sql`(CURRENT_TIMESTAMP)`),
updatedAt: text('updatedAt')
.notNull()
.default(sql`(CURRENT_TIMESTAMP)`)
.$onUpdate(() => sql`(CURRENT_TIMESTAMP)`),
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server