sql: permit multiple foreign keys with intersecting outbound columns #38850
Labels
A-sql-fks
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Currently, we do not permit a table to have multiple outbound foreign keys when those foreign keys have column sets with a non-zero intersection.
For example, consider the following schema:
If you wanted to create a table that allowed a user to comment on one of their friendships, that ensured referential integrity by checking that one of their friendships existed, you couldn't do so without a workaround:
The text was updated successfully, but these errors were encountered: