diff options
Diffstat (limited to 'app/models/ci/job_annotation.rb')
-rw-r--r-- | app/models/ci/job_annotation.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/ci/job_annotation.rb b/app/models/ci/job_annotation.rb index a6ce4196cc1..d56830433b1 100644 --- a/app/models/ci/job_annotation.rb +++ b/app/models/ci/job_annotation.rb @@ -8,7 +8,11 @@ module Ci self.table_name = :p_ci_job_annotations self.primary_key = :id - belongs_to :job, class_name: 'Ci::Build', inverse_of: :job_annotations + belongs_to :job, + ->(job_annotation) { in_partition(job_annotation) }, + class_name: 'Ci::Build', + partition_foreign_key: :partition_id, + inverse_of: :job_annotations partitionable scope: :job, partitioned: true |