Add trigger to update issues.correct_work_item_type_id whenever issues.work_item_type_id is changed
While we transition into a different foreign key issues.correct_work_item_type_id
we need to make sure this new column is updated with the correct value whenever the original FK is changed issues.work_item_type_id
. With this, we can already add a NOT VALID
FK to the column and backfill every issues record in a next step
Edited by Mario Celi