Fix `programming_languages` table to use globally stable identifier
## Problem statement Without converting this to a universal languageID, the customer project language statistics and Analytics will be corrupted after a move. The `programming_languages` table is a table with `id`, `name`, and `color` columns. The table has a unique index on the `name` column. The real data for this table comes from Gitaly. The `id` column makes this table inconsistent, and this inconsistent ID column is persisted in other tables (`repository_languages`). ## Proposal 1. Add a `language_id` column in `programming_languages` table, `bigint` - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/231864 2. Update the Gitaly::CommitService to return the returned response `l.language_id`. - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/230678 3. Update, or create the row in `programming_languages` with this `language_id` - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/232748 4. All referencing tables will be switched to refer to the `language_id` column instead. * `repository_languages` * ~~`analytics_language_trend_repository_languages`~~ - this table was dropped (see https://gitlab.com/gitlab-org/gitlab/-/work_items/597908) 5. Switch to use the `language_id` as the primary key of the `programming_languages` table. 6. Drop the `id` column.
issue