2
Foreign key relation: New Action if referenced is not present in table
Source: supabase/supabase#19929 · opened by @tizum
I'm creating a WhatsApp campaign system using the official API, and when someone replies to a message, I always receive the message/context ID in the payload. I save this information directly in the 'contact_replys' table without checking beforehand if the message/context ID exists in the 'campaign_messages' table. I don't check because I save all received messages in this table, and it would be too many requests, you see? The problem is that when I try to create a new row with the response in the 'contact_replys' table, it throws an error because the 'message_id' doesn't exist in the 'campaign_messages' table. The suggestion would be to add a new verification, similar to 'Action if referenced row is updated' and 'Action if referenced row is removed.' This would allow setting the column to a null value automatically because it doesn't make sense to save the 'message_id' with…
No pledges yet. Be the first to back this.
Comments
Similar requests
Improve table editor UI for arrays of foreign keys (they aren't supported)
2 votes · 0 comments
Improve Foreign Key Constraint Error UX in Table Editor
0 votes · 0 comments
Improve order example
3 votes · 0 comments
Default schema for Foreign Keys
1 vote · 0 comments
Foreign key relations page
1 vote · 0 comments
No comments yet.