Create Ci::JobInfo model for deduplicated data
Problem
In Introduce `Ci::JobDefinition` model (#551830 - closed) we introduce a new model to store deduplicated job data. In Ci::JobDefinition we store only immutable processing data so that we can:
- Easily deduplicate it.
- Easily drop (the old partitions) after pipelines are archived.
We could not deduplicate immutable intrinsic (long-term) data such as job names, needs, sources, etc. There is a great opportunity to leverage the lessons learned from Ci::JobDefinition and apply the same pattern and refactoring steps for a new model that stores immutable intrinsic data.
Proposal
We can introduce a new module (proposed name so far) called Ci::JobInfo to store immutable intrinsic data. Data must be immutable in order to be deduplicated at creation time and never updated. For any "mutable" data we have ci_builds.
We should verify that we can reuse the same pattern as Ci::JobDefinition: JSONB column + checksum + indexable columns.
Before we create this table/model, we need to wait for the results of the following spike/POC issues so that we can determine the best schema (including optimized column order):