Creation and use of `work_item_types` table
#### Steps - [x] create `work_item_types` table - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55705 - [x] add `work_item_type_id` to `issues` table - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55705 - [x] create initial base types in table - `issue`, `incident`, `test_case`, `requirement` - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67434 - [x] make sure new issues are created with both an `issue_type` and a `work_item_type_id` - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67638 - [x] populate each issue with corresponding `work_item_type_id` related to it's `issue_type` - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/71869 - [x] replace use of `issue_type` with `work_item_type_id` throughout code - https://gitlab.com/groups/gitlab-org/-/epics/10529 - [x] Drop `issues.issue_type` column - https://gitlab.com/gitlab-org/gitlab/-/issues/402699 - [ ] Deprecate issue_type as input in all APIs. Add work_item_type_id as input - https://gitlab.com/gitlab-org/gitlab/-/issues/403006 - [ ] Update docs - https://gitlab.com/gitlab-org/gitlab/-/issues/417670 Proposed schema changes ```plantuml hide circle hide empty members entity issues { used for WorkItem/Issue model -- normal attributes -- + id + project_id + milestone_id + etc... --- + issue_type + work_item_type_id } entity work_item_types { + id + type + namespace_id + title + description + description_html + cached_markdown_version + icon_name -- has_many -- - work_items } entity work_item_type_enum { * issue * incident * test_case * requirement } issues::work_item_type_id <-- work_item_types::work_items issues::issue_type -[dashed]- work_item_type_enum work_item_types::type -[dashed]- work_item_type_enum ``` _Note: the `issue_type` on the `issues` table is mostly for the transition. If it has any performance value (such as reducing a query to the type table), then we might consider kepping it. Otherwise, the plan is to remove it and rely only on the `type` field in the `work_item_types` table._ <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION --> *This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.* <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION -->
epic