Default now time for sqlite?

Does anyone know how to set default now time for sqlite-core orm? Thank you!
4 Replies
Angelelz
Angelelz16mo ago
.default(sql`CURRENT_TIMESTAMP`)
.default(sql`CURRENT_TIMESTAMP`)
codefork
codeforkOP16mo ago
@Angelelz Are you sure this works for sqlite?
Angelelz
Angelelz16mo ago
It is a keyword according to the docs: https://www.sqlite.org/lang_keywords.html
codefork
codeforkOP16mo ago
@Angelelz It works! Thanks a bunch!

Did you find this page helpful?