P
Prisma3w ago
Luka

Prisma ORM and Supabase RLS Policies

How can I add Supabase RLS policies in my Prisma ORM schema. My goal is to have one single source of truth schema and not add parts of my schema directly via Supabase dashboard.
3 Replies
Prisma AI Help
You selected to wait for the human sages. They'll share their wisdom soon. Grab some tea while you wait, or check out #ask-ai if you'd like a quick chat with the bot anyway!
Nurul
Nurul3w ago
Prisma does not currently have native support for defining Row Level Security (RLS) policies directly in the Prisma schema file. We have a feature request for it here: https://github.com/prisma/prisma/issues/12735 There's a related GH Discussion which might help: https://github.com/prisma/prisma/discussions/18642
GitHub
Support for row-level security (RLS) · Issue #12735 · prisma/prisma
Problem Currently, if we want to guarantee that user's requests have enough permissions to run a query, we have to keep coding where:{...} clauses everywhere in our code. Depending on the size ...
GitHub
Prisma + Supabase: Create RLS Policies? · prisma prisma · Discuss...
I'm a frontend developer that has been spending the last few months trying to brush up on my backend chops, please bare with me. I am currently trying to figure out a stack for my project, and ...
Luka
LukaOP3w ago
tnx

Did you find this page helpful?