Complete Prisma & Supabase DB Tutorial

preview_player
Показать описание
Postgres #database made easy! In this video, we will go over the initial local development setup for #supabase and #prisma, creating database #schemas, setting up entity #relationships, creating and running #migrations, #seeding the database, and running #queries with the prisma as well as the supabase clients, and much much more!

This took a while to create, I would greatly appreciate a like, and make sure to subscribe if this video has been helpful to you! ❤️

*Code*

*Follow Up Video*

*Timestamps*
0:00 Intro
1:00 Prerequisite: Docker Setup
2:31 Project Setup
3:10 Supabase Setup
5:30 Supabase Studio
7:05 Supabase Connection Options
10:39 Prisma Setup
11:39 Prisma Schema & Relationships
20:18 Schema Pushing & Migrations
27:34 Many-to-Many Relationships
30:13 Supabase Backups
32:09 Seeding Data with Prisma
41:36 Querying with Prisma
46:31 Supabase Type Generation & Querying
56:57 Outro
Рекомендации по теме
Комментарии
Автор

how to query many-to-many data in supabase client? (likedBy & likedPosts)

АлександрГригорий-ео
Автор

You're gonna go far. This is a brilliant tutorial.

ethanconnelly
Автор

I wish every tutorial was like this. Thank you so much!

kehrin
Автор

Great tutorial, even its useful for just postgresql with prisma. also I would recommend using tsx & bun instead of ts-node and node

ajinkyax
Автор

Thank you very much for your video, thanks to you, I have been informed in a good and efficient way.

TahaTan
Автор

Hey Doug, amazing video! Just subscribed to your channel, hoping to see more videos like this! Especially around T3 Stack and Supabase.

Would love to see what your workflow is like for Prisma/Supabase when in production, and also how to set up a custom auth provider with Prisma/Supabase (like Supertokens or Clerk), and how that interacts with RLS for authorization.

andric
Автор

Amazing tutorial helped me out a ton!!!!

TLTechbender
Автор

Hey Doug, great Tutorial!

I‘m wondering if prisma is capable of handling RLS and triggers in the schema.prisma file nicely (including putting the results into the migrations later).

If not: what could be a good strategy? Adding the sql manually to the migrations? Using the studio UI and then create migrations using the supabase cli?

ML
Автор

Subscripted! Your kind of doing the stuff - fast - good detailed (not too detailed) explaination - friendly - I hope you will produce more videos.


Especially I would love to see how you would setup the t3-turpo apps (supabase created a fork with auth for expo app) the nextjs app in the demo is using next-auth.. so I want to work with supabase from both apps but I am not sure if it is straight forward (with your videos I am a little bit more hopefull 😄)

Thanks for your videos man!

hanserlabber
Автор

Supabase Auth can not work well with Prisma, that's so pity.

xidnebwoz
Автор

FYI, I had to use this in package.json to seed: "prisma": { "seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts" }
Also from what I can tell there seems no more need to use --backup with supabase stop command.

hdd
Автор

Excellent video. Very clear and to-the-point. It explained so much the I was missing in other tutorials and confirmed that I had made the right choice in tooling . . . until I got to the part where Prisma won't work on the front end 😢. Is this a limitation of using Prisma with all databases or just with Supabase?

trinkel
Автор

Hey Doug great video man!, it would be nice to see implemented NextAuth with this setup

federicomarazzani
Автор

Can you make a video with prisma and supabase auth?

oamarkanji
Автор

From performance and developer friendly purpose, would you recommend Prisma for schema & seeding but using supabase for querying. Do you know how fast supabase queries are compare to prisma? Good content by the way

dheerajs
Автор

Possible to use Supabase edge function with prisma ?

عبدالقادرعبدالرحمنعبدالله
Автор

Why import client from supabase ?
Its enough to use prisma client and connect to supabase uri.

jeremyh
Автор


Again, excellent video. Thanks for posting it.

trinkel
Автор

Thank you for taking your time to share this useful video. I just suscribed to your channel after watching the video. My only queston is let say you have been developing locally as you demonstrated in the video. How do you connect your local supabase project to a production project?

Sabutofons
Автор

How can I do Full Text search on Prisma Postgresql setup

avi_