© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3mo ago•
1 reply
Luka

Choosing the right ORM

Hello, I am building a Next.js project and I have been thinking a lot about what ORM to choose. My first idea was to directly use Supabase client for API, Supabase CLI for migrations and Supabase gen types CLI for generating typescript types, but then i thought that maybe the app should be a bit less dependent on Supabase so i tried out the Prisma ORM.

My problem with prisma is that in the schema i can't define the RLS policies and foreign keys to other schemas, meaning i can not have a single source of truth file for my db.

Then i looked for something that can have the schema defined in raw SQL (so i can write custom queries for RLS and policies) so i tried out drizzle. The problem is that now i need to have one schema file with half typescript and half sql code, which is better than Prisma but still a bit weird.

My question is if I should ditch ORMs and use Supabase and it's CLI completely, I am just starting out this project and I wanna do it right, I am not looking to leave Supabase any time soon but I still wanna make my project futureproof.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Supabase Scalability: Choosing the Right Database Architecture
SupabaseSSupabase / help-and-questions
3y ago
Choosing the Right Supabase Environment Strategy (Branching vs Multiple Projects vs something else?)
SupabaseSSupabase / help-and-questions
4w ago
Choosing cheaper database
SupabaseSSupabase / help-and-questions
6d ago
ORM RLS Support
SupabaseSSupabase / help-and-questions
4y ago