© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
1 reply
현우Hyeon

How to use composite key as foreign key in another table?

I have a room table which has composite keys (creator_id, editor_id) as primary keys and I want to point them from another table called message but there's no option for designating composite keys for foreign key relation. What's the practical way of doing this? Do I need to create a new column in room table with unique id?
CleanShot_2022-09-02_at_14.36.482x.png
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

Composite key foreign key issue
SupabaseSSupabase / help-and-questions
6mo ago
Cant use airtable table as foreign table?
SupabaseSSupabase / help-and-questions
5mo ago
how to get access of another table based off foreign key?
SupabaseSSupabase / help-and-questions
3y ago
POST request using foreign key-table
SupabaseSSupabase / help-and-questions
4y ago