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
- Add a
language_idcolumn inprogramming_languagestable,bigint- !231864 (merged) - Update the Gitaly::CommitService to return the returned response
l.language_id. - !230678 (merged) - Update, or create the row in
programming_languageswith thislanguage_id- !232748 (merged) - All referencing tables will be switched to refer to the
language_idcolumn instead.repository_languages- this table was dropped (see #597908 (closed))analytics_language_trend_repository_languages
- Switch to use the
language_idas the primary key of theprogramming_languagestable. - Drop the
idcolumn.
Edited by Vasilii Iakliushin