Prisma migrate dev frozen with Supabase

Hi here!

I’m just trying to start a new Redwood/Supabase project.
I’m following this supabase doc Use Supabase with RedwoodJS | Supabase Docs.

Everything goes well until i try to execute this command:

yarn rw prisma migrate dev

At this point, my terminal seems to be frozen… the migration never happen.

I tried some tips read on the forums and GitHub such as the shadowDatabase, but nothing change for me.

Has someone a bit of information or starting point to bypass this current issue?

Many thanks

1 Like

Hey Vince - can you provide a link to your repo? We could clone/run it and help debug that way.

Also, I remember the more advanced supabase-redwood quick-start was outdated. I had to make these changes to get it all working.

Merge pull request #1 from pantheredeye/master · hope211/suparedwood@bbed4aa (github.com)

You might can check that. I feel like it was using an outdated supabase library, and all the supabase imports were deprecated… not sure if that would stall a prisma migrate, but that might be worth checking. Also, some of the redwood packages had changed/etc.

Looking back it was mainly for auth. shrug

Providing a link to the repo might be the best way for us to debug!

Hey @PantheRedEye

Thank you for the answer!
I understand but i’m not sure how to provide it, cause it’s a fresh created Redwood app with no code added, just the env conf that point to the supabase project… and it could be strange to provide the supabase credentials to test it…
That’s the reason why i wrote the case is to follow the 5 or 6 small step of the supabase tuto…
But i’m conscient that’s a Supabase tuto, not a Redwood one…

If you have in mind a way i can provide that, i will enjoy to do that!

Thanks a lot
Vince

@PantheRedEye,

FYI, i tested this tuto (so without Redwood), and it works, so i can imagine that’s related to a Redwood config…

Yeah, please don’t provide any credentials!

A fresh install and all you did was add the Postgres connector and run Prisma migrate…

Is there any sort of error log when it hangs?

I’m thin on help here. I’m sure someone can help with this. I found this to check: Connection Pooling | RedwoodJS Docs

Yeah obviously i will not ^^

No. No log or error when it hangs… this is the point, i’m feeling unchained!
I don’t know how it could be possible, if it is possible, to run the command with some debug param and have any information to go forward.

Thank you for the interested link, but after another try, that not works…

I hope someone else can help me, but thank you for your help @PantheRedEye!

@PantheRedEye

I just found the solution!

In the Supabase guide (Redwood+Supabase), they seem to make a mistake in the env configuration.

To fix it, just invert the name of the both env vars :

DATABASE_URL is the one with the port 6543 and the params (pgbouncer=true&connection_limit=1).
DIRECT_URL is the on with the port 5432 and no params.

To find it i recheck many times the configuration in the Prisma Guide that is working (Prisma | Works With Supabase)

And that works!

1 Like

Great!

Would you consider submitting a PR to update the supabase guide??

I’ve come across this as well, when migrating with prisma in the CLI you should use the direct_url otherwise it hangs. Thanks Vince!

1 Like