FeatureFuel
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.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests