diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-21 00:10:26 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-21 00:10:26 +0000 |
commit | 3f9ae4674edd5b23ec9cd5b2bbb4a0caae5eec74 (patch) | |
tree | 3d8e65627e0fa03b967f11035b23133df0a860e7 /db | |
parent | 40e8ba2fc8ac6c3695d7f297ff4143518615a3f9 (diff) | |
download | gitlab-ce-3f9ae4674edd5b23ec9cd5b2bbb4a0caae5eec74.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
15 files changed, 136 insertions, 11 deletions
diff --git a/db/fixtures/development/98_gitlab_instance_administration_project.rb b/db/fixtures/development/98_gitlab_instance_administration_project.rb index 3338f2bd2fc..ccd6907c8cc 100644 --- a/db/fixtures/development/98_gitlab_instance_administration_project.rb +++ b/db/fixtures/development/98_gitlab_instance_administration_project.rb @@ -8,8 +8,8 @@ response = Sidekiq::Worker.skipping_transaction_check do end if response[:status] == :success - puts "Successfully created self monitoring project." + puts "Successfully created self-monitoring project." else - puts "Could not create self monitoring project due to error: '#{response[:message]}'" + puts "Could not create self-monitoring project due to error: '#{response[:message]}'" puts "Check logs for more details." end diff --git a/db/fixtures/production/998_gitlab_instance_administration_project.rb b/db/fixtures/production/998_gitlab_instance_administration_project.rb index 8be707ffb08..d935832aea6 100644 --- a/db/fixtures/production/998_gitlab_instance_administration_project.rb +++ b/db/fixtures/production/998_gitlab_instance_administration_project.rb @@ -3,8 +3,8 @@ response = ::Gitlab::DatabaseImporters::SelfMonitoring::Project::CreateService.new.execute if response[:status] == :success - puts "Successfully created self monitoring project." + puts "Successfully created self-monitoring project." else - puts "Could not create self monitoring project due to error: '#{response[:message]}'" + puts "Could not create self-monitoring project due to error: '#{response[:message]}'" puts "Check logs for more details." end diff --git a/db/migrate/20221017084208_rename_ci_pipeline_metadata_title.rb b/db/migrate/20221017084208_rename_ci_pipeline_metadata_title.rb new file mode 100644 index 00000000000..3c1a3bbd40a --- /dev/null +++ b/db/migrate/20221017084208_rename_ci_pipeline_metadata_title.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class RenameCiPipelineMetadataTitle < Gitlab::Database::Migration[2.0] + disable_ddl_transaction! + + def up + rename_column_concurrently :ci_pipeline_metadata, :title, :name, batch_column_name: :pipeline_id + end + + def down + undo_rename_column_concurrently :ci_pipeline_metadata, :title, :name + end +end diff --git a/db/post_migrate/20221017084227_cleanup_rename_ci_pipeline_metadata_title.rb b/db/post_migrate/20221017084227_cleanup_rename_ci_pipeline_metadata_title.rb new file mode 100644 index 00000000000..0829f3d8734 --- /dev/null +++ b/db/post_migrate/20221017084227_cleanup_rename_ci_pipeline_metadata_title.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class CleanupRenameCiPipelineMetadataTitle < Gitlab::Database::Migration[2.0] + disable_ddl_transaction! + + def up + cleanup_concurrent_column_rename :ci_pipeline_metadata, :title, :name + end + + def down + undo_cleanup_concurrent_column_rename :ci_pipeline_metadata, :title, :name, batch_column_name: :pipeline_id + end +end diff --git a/db/post_migrate/20221019194751_disable_fastupdate_on_issues_title_gin_index.rb b/db/post_migrate/20221019194751_disable_fastupdate_on_issues_title_gin_index.rb new file mode 100644 index 00000000000..6ad846dda1c --- /dev/null +++ b/db/post_migrate/20221019194751_disable_fastupdate_on_issues_title_gin_index.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class DisableFastupdateOnIssuesTitleGinIndex < Gitlab::Database::Migration[2.0] + disable_ddl_transaction! + + INDEX_NAME = 'index_issues_on_title_trigram' + + def up + with_lock_retries do + execute <<~SQL + ALTER INDEX #{INDEX_NAME} SET ( fastupdate = false ) ; + SQL + end + end + + def down + with_lock_retries do + execute <<~SQL + ALTER INDEX #{INDEX_NAME} RESET ( fastupdate ) ; + SQL + end + end +end diff --git a/db/post_migrate/20221019195754_disable_fastupdate_on_issues_description_gin_index.rb b/db/post_migrate/20221019195754_disable_fastupdate_on_issues_description_gin_index.rb new file mode 100644 index 00000000000..ce09a48833f --- /dev/null +++ b/db/post_migrate/20221019195754_disable_fastupdate_on_issues_description_gin_index.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class DisableFastupdateOnIssuesDescriptionGinIndex < Gitlab::Database::Migration[2.0] + disable_ddl_transaction! + + INDEX_NAME = 'index_issues_on_description_trigram' + + def up + with_lock_retries do + execute <<~SQL + ALTER INDEX #{INDEX_NAME} SET ( fastupdate = false ) ; + SQL + end + end + + def down + with_lock_retries do + execute <<~SQL + ALTER INDEX #{INDEX_NAME} RESET ( fastupdate ) ; + SQL + end + end +end diff --git a/db/post_migrate/20221019200033_disable_fastupdate_on_merge_requests_title_gin_index.rb b/db/post_migrate/20221019200033_disable_fastupdate_on_merge_requests_title_gin_index.rb new file mode 100644 index 00000000000..eb4c413a5a9 --- /dev/null +++ b/db/post_migrate/20221019200033_disable_fastupdate_on_merge_requests_title_gin_index.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class DisableFastupdateOnMergeRequestsTitleGinIndex < Gitlab::Database::Migration[2.0] + disable_ddl_transaction! + + INDEX_NAME = 'index_merge_requests_on_title_trigram' + + def up + with_lock_retries do + execute <<~SQL + ALTER INDEX #{INDEX_NAME} SET ( fastupdate = false ) ; + SQL + end + end + + def down + with_lock_retries do + execute <<~SQL + ALTER INDEX #{INDEX_NAME} RESET ( fastupdate ) ; + SQL + end + end +end diff --git a/db/post_migrate/20221019200206_disable_fastupdate_on_merge_requests_description_gin_index.rb b/db/post_migrate/20221019200206_disable_fastupdate_on_merge_requests_description_gin_index.rb new file mode 100644 index 00000000000..2e55937db36 --- /dev/null +++ b/db/post_migrate/20221019200206_disable_fastupdate_on_merge_requests_description_gin_index.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class DisableFastupdateOnMergeRequestsDescriptionGinIndex < Gitlab::Database::Migration[2.0] + disable_ddl_transaction! + + INDEX_NAME = 'index_merge_requests_on_description_trigram' + + def up + with_lock_retries do + execute <<~SQL + ALTER INDEX #{INDEX_NAME} SET ( fastupdate = false ) ; + SQL + end + end + + def down + with_lock_retries do + execute <<~SQL + ALTER INDEX #{INDEX_NAME} RESET ( fastupdate ) ; + SQL + end + end +end diff --git a/db/schema_migrations/20221017084208 b/db/schema_migrations/20221017084208 new file mode 100644 index 00000000000..3fb09558549 --- /dev/null +++ b/db/schema_migrations/20221017084208 @@ -0,0 +1 @@ +d28932a3d52279446e3ef84806a6bb6b53dc10c5b9ae81e2c626203da4238a9a
\ No newline at end of file diff --git a/db/schema_migrations/20221017084227 b/db/schema_migrations/20221017084227 new file mode 100644 index 00000000000..9f57ca08267 --- /dev/null +++ b/db/schema_migrations/20221017084227 @@ -0,0 +1 @@ +dc03ff5c63ada744d41e5e37e276306b1fe3bb2d8f925ebb0087be3a4b51791e
\ No newline at end of file diff --git a/db/schema_migrations/20221019194751 b/db/schema_migrations/20221019194751 new file mode 100644 index 00000000000..e917d4ac1f6 --- /dev/null +++ b/db/schema_migrations/20221019194751 @@ -0,0 +1 @@ +785ed2a3c711edf54f1b23bdbd4b333b7a4ee02b86f8581c1f4cc20003e5f832
\ No newline at end of file diff --git a/db/schema_migrations/20221019195754 b/db/schema_migrations/20221019195754 new file mode 100644 index 00000000000..2be5ca3ce1a --- /dev/null +++ b/db/schema_migrations/20221019195754 @@ -0,0 +1 @@ +b09530d7b72d70774624ef44683be6665bd1141be49db551a0dfe303ce67eefa
\ No newline at end of file diff --git a/db/schema_migrations/20221019200033 b/db/schema_migrations/20221019200033 new file mode 100644 index 00000000000..2826a18d7df --- /dev/null +++ b/db/schema_migrations/20221019200033 @@ -0,0 +1 @@ +a72855a95f243d2a404d840fde900a99b9f568144dfde47e813c4e9bc81ef8cf
\ No newline at end of file diff --git a/db/schema_migrations/20221019200206 b/db/schema_migrations/20221019200206 new file mode 100644 index 00000000000..73eb8571a5a --- /dev/null +++ b/db/schema_migrations/20221019200206 @@ -0,0 +1 @@ +1bd5d356d0a15737178eee70bce65c9883bd5daa2a672a9049ccecb4e73f431b
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index d8f7a6417cc..7b6c5bccca1 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -13061,8 +13061,9 @@ ALTER SEQUENCE ci_pipeline_messages_id_seq OWNED BY ci_pipeline_messages.id; CREATE TABLE ci_pipeline_metadata ( project_id bigint NOT NULL, pipeline_id bigint NOT NULL, - title text NOT NULL, - CONSTRAINT check_e6a636a3f3 CHECK ((char_length(title) <= 255)) + name text, + CONSTRAINT check_25d23931f1 CHECK ((name IS NOT NULL)), + CONSTRAINT check_9d3665463c CHECK ((char_length(name) <= 255)) ); CREATE TABLE ci_pipeline_schedule_variables ( @@ -28355,7 +28356,7 @@ CREATE UNIQUE INDEX index_ci_pipeline_chat_data_on_pipeline_id ON ci_pipeline_ch CREATE INDEX index_ci_pipeline_messages_on_pipeline_id ON ci_pipeline_messages USING btree (pipeline_id); -CREATE INDEX index_ci_pipeline_metadata_on_pipeline_id_title ON ci_pipeline_metadata USING btree (pipeline_id, title); +CREATE INDEX index_ci_pipeline_metadata_on_pipeline_id_name ON ci_pipeline_metadata USING btree (pipeline_id, name); CREATE INDEX index_ci_pipeline_metadata_on_project_id ON ci_pipeline_metadata USING btree (project_id); @@ -29271,7 +29272,7 @@ CREATE INDEX index_issues_on_closed_by_id ON issues USING btree (closed_by_id); CREATE INDEX index_issues_on_confidential ON issues USING btree (confidential); -CREATE INDEX index_issues_on_description_trigram ON issues USING gin (description gin_trgm_ops); +CREATE INDEX index_issues_on_description_trigram ON issues USING gin (description gin_trgm_ops) WITH (fastupdate='false'); CREATE INDEX index_issues_on_duplicated_to_id ON issues USING btree (duplicated_to_id) WHERE (duplicated_to_id IS NOT NULL); @@ -29307,7 +29308,7 @@ CREATE INDEX index_issues_on_promoted_to_epic_id ON issues USING btree (promoted CREATE INDEX index_issues_on_sprint_id ON issues USING btree (sprint_id); -CREATE INDEX index_issues_on_title_trigram ON issues USING gin (title gin_trgm_ops); +CREATE INDEX index_issues_on_title_trigram ON issues USING gin (title gin_trgm_ops) WITH (fastupdate='false'); CREATE INDEX index_issues_on_updated_at ON issues USING btree (updated_at); @@ -29521,7 +29522,7 @@ CREATE INDEX index_merge_requests_on_author_id_and_target_project_id ON merge_re CREATE INDEX index_merge_requests_on_created_at ON merge_requests USING btree (created_at); -CREATE INDEX index_merge_requests_on_description_trigram ON merge_requests USING gin (description gin_trgm_ops); +CREATE INDEX index_merge_requests_on_description_trigram ON merge_requests USING gin (description gin_trgm_ops) WITH (fastupdate='false'); CREATE INDEX index_merge_requests_on_head_pipeline_id ON merge_requests USING btree (head_pipeline_id); @@ -29557,7 +29558,7 @@ CREATE INDEX index_merge_requests_on_target_project_id_and_updated_at_and_id ON CREATE INDEX index_merge_requests_on_target_project_id_iid_jira_description ON merge_requests USING btree (target_project_id, iid) WHERE (description ~ '[A-Z][A-Z_0-9]+-\d+'::text); -CREATE INDEX index_merge_requests_on_title_trigram ON merge_requests USING gin (title gin_trgm_ops); +CREATE INDEX index_merge_requests_on_title_trigram ON merge_requests USING gin (title gin_trgm_ops) WITH (fastupdate='false'); CREATE INDEX index_merge_requests_on_tp_id_and_merge_commit_sha_and_id ON merge_requests USING btree (target_project_id, merge_commit_sha, id); |