Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2023-04-15 06:12:13 +00:00
parent d482517583
commit 792ffb0daf
6 changed files with 42 additions and 0 deletions

View File

@ -14,6 +14,9 @@ module Ci
include EachBatch
include Gitlab::Utils::StrongMemoize
# NOTE: Temporarily ignore. This will will be used in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106740
ignore_column :file_final_path, remove_with: '16.1', remove_after: '2023-05-23'
enum accessibility: { public: 0, private: 1 }, _suffix: true
NON_ERASABLE_FILE_TYPES = %w[trace].freeze

View File

@ -0,0 +1,12 @@
# frozen_string_literal: true
class AddCiJobArtifactsFileFinalPath < Gitlab::Database::Migration[2.1]
enable_lock_retries!
# rubocop:disable Migration/AddLimitToTextColumns
# limit is added in db/post_migrate/20230412152538_add_text_limit_to_ci_job_artifacts_file_final_path.rb
def change
add_column :ci_job_artifacts, :file_final_path, :text, null: true
end
# rubocop:enable Migration/AddLimitToTextColumns
end

View File

@ -0,0 +1,21 @@
# frozen_string_literal: true
class AddTextLimitToCiJobArtifactsFileFinalPath < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
def up
add_text_limit :ci_job_artifacts, :file_final_path, 1024, constraint_name: constraint_name, validate: false
prepare_async_check_constraint_validation(:ci_job_artifacts, name: constraint_name)
end
def down
unprepare_async_check_constraint_validation(:ci_job_artifacts, name: constraint_name)
remove_text_limit :ci_job_artifacts, :file_final_path
end
private
def constraint_name
text_limit_name(:ci_job_artifacts, :file_final_path)
end
end

View File

@ -0,0 +1 @@
dccf257ed6a503983fe54f8e06d37e4a64906e1dc9f7e970fdfab77f13eebedb

View File

@ -0,0 +1 @@
82f54822df6794347ba83f4c1a78540b7eb47c2deb059de143cd9a5b77f47f1f

View File

@ -13296,6 +13296,7 @@ CREATE TABLE ci_job_artifacts (
locked smallint DEFAULT 2,
partition_id bigint DEFAULT 100 NOT NULL,
accessibility smallint DEFAULT 0 NOT NULL,
file_final_path text,
CONSTRAINT check_27f0f6dbab CHECK ((file_store IS NOT NULL))
);
@ -26540,6 +26541,9 @@ ALTER TABLE ONLY chat_teams
ALTER TABLE vulnerability_scanners
ADD CONSTRAINT check_37608c9db5 CHECK ((char_length(vendor) <= 255)) NOT VALID;
ALTER TABLE ci_job_artifacts
ADD CONSTRAINT check_9f04410cf4 CHECK ((char_length(file_final_path) <= 1024)) NOT VALID;
ALTER TABLE sprints
ADD CONSTRAINT check_ccd8a1eae0 CHECK ((start_date IS NOT NULL)) NOT VALID;