© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
3 replies
amorenva

no unique constraint matching

Hey guys. Trying to stablish a foreign key relationship between two tables (Plans.quantity < Subscription.quantity), but getting the
"Failed to update column "quantity": Failed to run sql query: there is no unique constraint matching given keys for referenced table "subscriptions" error message.
Here is a snapshot of my db schema. I just want the quantity (or seats) of this tiny SaaS to be updated via the Stripe's Webhook. :supabase:
db_schema_problem1.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

Getting - there is no unique constraint matching
SupabaseSSupabase / help-and-questions
4y ago
No unique constraint error when creating table
SupabaseSSupabase / help-and-questions
4y ago
Constraint unique where other column
SupabaseSSupabase / help-and-questions
7mo ago
duplicate key value violates unique constraint "profiles_pkey"
SupabaseSSupabase / help-and-questions
3y ago