When I reworked InvolvedAuthorities, I only expected it to be linked with Expressions or Works. So I've added separate columns to work_id and expression_id.
Now we added collection_id there. And probably in future we'll want to reuse it for something else.
If so I believe it would be better to use polymorphic relation with two columns: item_id, item_type instead of work_id/expression_id/collection_id.
So it will be kind of rollbacking of part of my changes, but I believe it should be easy enough.
When I reworked InvolvedAuthorities, I only expected it to be linked with Expressions or Works. So I've added separate columns to work_id and expression_id.
Now we added collection_id there. And probably in future we'll want to reuse it for something else.
If so I believe it would be better to use polymorphic relation with two columns: item_id, item_type instead of work_id/expression_id/collection_id.
So it will be kind of rollbacking of part of my changes, but I believe it should be easy enough.