Remove foreign key constraints from work_item_type_id columns

MRs:

Description

As part of implementing configurable work item types with Option 4 (single column approach), we need to remove foreign key constraints from work_item_type_id columns.

This is necessary because we'll be storing both positive IDs (system-defined types) and negative IDs (custom types) in the same column, which breaks traditional foreign key relationships.

Proposal

Problem: The existing foreign key constraints from work_item_type_id to work_item_types table prevent us from storing negative IDs for custom work item types.

Solution: Create a database migration that drops the foreign key constraints from work_item_type_id columns in these tables:

  • issues
  • work_item_type_custom_fields
  • work_item_type_custom_lifecycles
  • work_item_custom_status_mappings
  • work_item_type_user_preferences (this one requires investigation)
Edited by Daniyal Arshad