You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, SQLite allows default values for a text column to be set as CURRENT_TIMESTAMP. Drizzle however only automatically casts integer(..., { mode: 'timestamp' } (and _ms) to Date objects, making those two features incompatible.
We should allow text to also be a timestamp so it can be used in conjunction with the default value:
Describe what you want
Currently, SQLite allows default values for a
text
column to be set asCURRENT_TIMESTAMP
. Drizzle however only automatically castsinteger(..., { mode: 'timestamp' }
(and_ms
) toDate
objects, making those two features incompatible.We should allow
text
to also be atimestamp
so it can be used in conjunction with the default value:Expecting
created
to be of typeDate
when selecting.Why?
Currently it isn't possible to achieve the "default to current timestamp" when columns are of type integer, only text.
The text was updated successfully, but these errors were encountered: