Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ci/build_need.rb')
-rw-r--r--app/models/ci/build_need.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/ci/build_need.rb b/app/models/ci/build_need.rb
index 317f2523f69..00241908644 100644
--- a/app/models/ci/build_need.rb
+++ b/app/models/ci/build_need.rb
@@ -7,15 +7,16 @@ module Ci
include SafelyChangeColumnDefault
include BulkInsertSafe
+ MAX_JOB_NAME_LENGTH = 128
+
columns_changing_default :partition_id
- ignore_column :id_convert_to_bigint, remove_with: '16.4', remove_after: '2023-09-22'
belongs_to :build, class_name: "Ci::Processable", foreign_key: :build_id, inverse_of: :needs
partitionable scope: :build
validates :build, presence: true
- validates :name, presence: true, length: { maximum: 128 }
+ validates :name, presence: true, length: { maximum: MAX_JOB_NAME_LENGTH }
validates :optional, inclusion: { in: [true, false] }
scope :scoped_build, -> { where("#{Ci::Build.quoted_table_name}.id = #{quoted_table_name}.build_id") }