© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
2 replies
Lordson

triggers in database

how can I create a relationship between two tables where if a table uses another table as a primary key the other table just automatically fills in space for the other table.

let me go clear now

I have a community table and a user table. what I want is that if the community adds a user as a foreign key the user table should automatically fill in the community_id column since I have made a foriegn key to the user
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

Database restoration triggers
SupabaseSSupabase / help-and-questions
4mo ago
Dependent Database Triggers & Functions
SupabaseSSupabase / help-and-questions
4y ago
Auth table not accessible anymore within database triggers
SupabaseSSupabase / help-and-questions
3y ago
Postgres triggers
SupabaseSSupabase / help-and-questions
4y ago