Update the application to use the partitioned table p_ci_pipelines

See https://docs.gitlab.com/ee/development/database/partitioning/list.html#step-10---update-the-application-to-use-the-partitioned-table

  • To change the table_name for Ci::Pipeline, use a change management issue

  • NOTE that we will need to update the enum Enums::InternalId.usage_resources:

    module Enums
      module InternalId
        def self.usage_resources
          {
            # from: ci_pipelines: 5,
            p_ci_pipelines: 5,
          }
        end
      end
    end
    
  • And define the internal_id_scope_usage as :p_ci_pipelines as well:

    module Ci
      class Pipeline < Ci::ApplicationRecord
        def self.internal_id_scope_usage; :p_ci_pipelines; end
      end
    end
Edited by Tianwen Chen