is not assignable to type 'DrizzleD1Database'
Hello
This last release was amazing. Making joins simple was the missing piece for me.
However, I'm trying to upgrade https://race-stack.pages.dev to the new API (it previously used the joins).
I'm getting the error from the screenshot. Not sure what's going on, created a PR with it.
Here's the PR - https://github.com/jose-donato/race-stack/pull/2
schema - https://github.com/jose-donato/race-stack/blob/f5ce04cdae134302c94e2de671c7a272274dab36/app/lib/schema.ts
db initialization - https://github.com/jose-donato/race-stack/blob/f5ce04cdae134302c94e2de671c7a272274dab36/app/lib/db.service.server.ts
GitHub
race-stack/schema.ts at f5ce04cdae134302c94e2de671c7a272274dab36 · ...
Remix run stack built for the edge (cloudflare pages and d1) - race-stack/schema.ts at f5ce04cdae134302c94e2de671c7a272274dab36 · jose-donato/race-stack
GitHub
race-stack/db.service.server.ts at f5ce04cdae134302c94e2de671c7a272...
Remix run stack built for the edge (cloudflare pages and d1) - race-stack/db.service.server.ts at f5ce04cdae134302c94e2de671c7a272274dab36 · jose-donato/race-stack
4 Replies
Will try to check and fix it asap
no rush, thanks for the help 🤟
not a bug with drizzle, you explicitly type the return type of that function as
DrizzleD1Database
which is not assignable, try DrizzleD1Database<typeof schema>
works for me, i cloned your pr
looks like a nice project you got also ohhhh I'm dumb 🫣🫣🫣
sorry for wasting your time with this 😅
thank you! drizzle has been amazing to work with. using on several projects