Implement custom "FK" for work_item_type_id
What does this MR do and why?
Today we have a FK on the issues table referencing the work_item_types table. This Fk does not CASCADE DELETE. We want to do the same with work_item_custom_types. Adding a trigger to prevent type deletion if referenced by any issue
We also need to make sure the work_item_type_id is valid when inserting or updating in multiple tables
This is the implementation of the PoC at !223271 (closed)
There's another MR that will drop the foreign key from these tables at !221910 (merged). For other tables that cascade delete we can implement Loose foreign keys before dropping.
Related to #588587 (closed) #591095 (closed)
Edited by Mario Celi