Drizzle & Supabase
Hello, im using supabase and doing a database first approach. I make my db changes using supabase UI and then i drizzle-kit pull to generate the ts files.
right now doing the command its making
and
the
usersInAuth
doesn't exists and i saw looking through discord we import from:
import { authUsers } from "drizzle-orm/supabase"
to make it work.
But how can i make drizzle use that, because whenever i drizzle-kit pull, its just going to keep overwriting the relation,schema ts files
any help/advice when working with supabase would be appreciated. thanks15 Replies
anyone?
bump
@Mario564 is this a bug? is there anything i can do?
This definitely seems like an oversight on our part. Could you please submit an issue on Github to track this issue?
We may not be able to immediately fix it as Kit is underdoing a rewrite, but we'll try to address it as soon as that's done
yea i did: https://github.com/drizzle-team/drizzle-orm/issues/4405
is there anything i can do in the meantime 😦
Not much for now, aside from manually including the import or making script that adds that line
Alright... thanks for the answer
is this another bug? i made an issue for it just in case since im not sure. https://github.com/drizzle-team/drizzle-orm/issues/4407
It likely is a bug
😢
this not looking good, might have to just end up using supabase orm...
do you have any advice since theres quite a few issues right now? i really wanted to use drizzle but idk what to do now..
I think the best coures of action right now is adding your own script that patches up the issues you may encounter with introspection. Aside from some Kit issues, the ORM itself is very stable and definitely worth a shot
alright, thank you. I know its impossible to give timeframes, but do you have a best estimate on when these things(with supabase specifically) will become more stable?
Don't have an ETA since there's implementing these fixes, reviewing them and then shipping them to a release, which all might have variable amount of time to complete
also since the issues seem to be mostly with introspection, would you recommend i do create the tables through code then push to supabase. so do a codebase first approach?
That's also an alternative. Things should be a lot more stable in that regard
alright, thanks again so much for the help
There are so many small but breaking issues like this that I can't understand how anyone is using drizzle-kit and supabase seriously 🤔
yes. There is no way to use it. Especially the Auth. Man, 3 days I am implementing stupid solutions for e-commerce cart sessions. Nextauth, Better auth and Supabase CANNOT make simple sessions with drizzle
it's getting absurd
If you want auth schema in drizzle you are screwed.