SQLite Timestamp does not allow a default NULL value

As the title says,

updatedAt: integer("updated_at", { mode: "timestamp" })
    .default(null)
    .$onUpdateFn(() => new Date(new Date().toLocaleString("en-US", { timeZone: "Asia/Taipei" }))),


Are there no workarounds for this?

Here's the error I get: Argument of type 'null' is not assignable to parameter of type 'SQL<unknown> | Date'.
Was this page helpful?