diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-15 09:12:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-15 09:12:13 +0300 |
commit | 792ffb0daf235b6150f696fc1b5ea63fc9845b94 (patch) | |
tree | 90d67d6819fd747e09a2c3a186079ae648e1982e /db | |
parent | d482517583173924ba7961a2b0e9e07d1b51bb78 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20230412151659_add_ci_job_artifacts_file_final_path.rb | 12 | ||||
-rw-r--r-- | db/post_migrate/20230412152538_add_text_limit_to_ci_job_artifacts_file_final_path.rb | 21 | ||||
-rw-r--r-- | db/schema_migrations/20230412151659 | 1 | ||||
-rw-r--r-- | db/schema_migrations/20230412152538 | 1 | ||||
-rw-r--r-- | db/structure.sql | 4 |
5 files changed, 39 insertions, 0 deletions
diff --git a/db/migrate/20230412151659_add_ci_job_artifacts_file_final_path.rb b/db/migrate/20230412151659_add_ci_job_artifacts_file_final_path.rb new file mode 100644 index 00000000000..18bf8640a45 --- /dev/null +++ b/db/migrate/20230412151659_add_ci_job_artifacts_file_final_path.rb @@ -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 diff --git a/db/post_migrate/20230412152538_add_text_limit_to_ci_job_artifacts_file_final_path.rb b/db/post_migrate/20230412152538_add_text_limit_to_ci_job_artifacts_file_final_path.rb new file mode 100644 index 00000000000..1ee83486cc5 --- /dev/null +++ b/db/post_migrate/20230412152538_add_text_limit_to_ci_job_artifacts_file_final_path.rb @@ -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 diff --git a/db/schema_migrations/20230412151659 b/db/schema_migrations/20230412151659 new file mode 100644 index 00000000000..96c304452d8 --- /dev/null +++ b/db/schema_migrations/20230412151659 @@ -0,0 +1 @@ +dccf257ed6a503983fe54f8e06d37e4a64906e1dc9f7e970fdfab77f13eebedb
\ No newline at end of file diff --git a/db/schema_migrations/20230412152538 b/db/schema_migrations/20230412152538 new file mode 100644 index 00000000000..74f27a94bb5 --- /dev/null +++ b/db/schema_migrations/20230412152538 @@ -0,0 +1 @@ +82f54822df6794347ba83f4c1a78540b7eb47c2deb059de143cd9a5b77f47f1f
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 9e6b0dc0561..93aeb7d1a47 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -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; |