matheus
DTDrizzle Team
•Created by matheus on 10/14/2024 in #help
Error: ... not assignable to parameter of type SelectedFields
I am trying to build a wrapper around drizzle select and this is being hard to achieve.
What do I want? I want to create a wrapper that receives a where clause and SelectedFields, but I want the type-safety in order to suggest only valid columns to the user. I have something like this:
But this is getting me to this error:
If I change from
unknown
to any
, everything works fine. What I really want, is to use $inferSelect
type so the method becomes type-safe with selects columns.
How can I do that?1 replies
DTDrizzle Team
•Created by matheus on 7/26/2024 in #help
How can I reset migrations timestamp
I am using drizzle in one of my projects and somehow the timestamp of migrations were wrong. Trying to fix it, I edited, by hand, the timestamp value in
meta/_journal.json
, increasing the timestamp value present in when
key.
The value I put there is far in the future, and because of that, every new migration that I create is not running due to that inconsistency.
So my question is: Can I fix it? How?
My meta/_journal.json
looks like this:
2 replies