Closed drew-dulgar closed 2 weeks ago
Just get rid of that weird extra Generated
type and use the internal types. Also move | null
inside the Column type helper instead of outside.
The weird Generated type came from kysely-codegen. Shall I raise the issue over there?
Your example seems to works perfectly 🤔
You probably used Pick<AccountTable 'id' | 'login_last'>
at some point and got the error then?
Hello - I have a timestamp column in postgres, and I am just having the hardest of time trying to understand why i can't actually use the Generated type definition with this while assigning a value. I do admit i am a bit of a typescript noob, so i hope i'm just missing something silly.
In the given scenario, I only need to update this specific date column (as a patch), so it's a pretty paired down version of Updateable.
Migration
Type Definitions
Account Table Types
Usage
Call the query
I am now getting a
Type 'Date' is missing the following properties from type 'Timestamp': __select__, __insert__, __update__ts(2739)
Or if trying with a string...
Call the query
Type 'string' is not assignable to type 'Timestamp'.
Any thoughts here? I just really want to update a column in a database table with the current time stamp, but i am stumped here.