diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-14 18:08:55 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-14 18:08:55 +0000 |
commit | 3828d19ab2d68dd6cafa6f08221e1eee572671e7 (patch) | |
tree | afd36fcf20499d876493bf24bd9f0ee926454547 /db | |
parent | 3e764061b3209d4deee2a55851d5d564a9f19d8b (diff) | |
download | gitlab-ce-3828d19ab2d68dd6cafa6f08221e1eee572671e7.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
4 files changed, 20 insertions, 0 deletions
diff --git a/db/migrate/20230307091216_add_status_reporter_id_and_id_index_to_abuse_reports.rb b/db/migrate/20230307091216_add_status_reporter_id_and_id_index_to_abuse_reports.rb new file mode 100644 index 00000000000..cfd077368c8 --- /dev/null +++ b/db/migrate/20230307091216_add_status_reporter_id_and_id_index_to_abuse_reports.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddStatusReporterIdAndIdIndexToAbuseReports < Gitlab::Database::Migration[2.1] + INDEX_NAME = 'index_abuse_reports_on_status_reporter_id_and_id' + + disable_ddl_transaction! + + def up + add_concurrent_index :abuse_reports, [:status, :reporter_id, :id], name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :abuse_reports, INDEX_NAME + end +end diff --git a/db/post_migrate/20230214181633_finalize_ci_build_needs_big_int_conversion.rb b/db/post_migrate/20230214181633_finalize_ci_build_needs_big_int_conversion.rb index 11870b9c540..1ac7b447457 100644 --- a/db/post_migrate/20230214181633_finalize_ci_build_needs_big_int_conversion.rb +++ b/db/post_migrate/20230214181633_finalize_ci_build_needs_big_int_conversion.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class FinalizeCiBuildNeedsBigIntConversion < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + restrict_gitlab_migration gitlab_schema: :gitlab_ci TABLE_NAME = 'ci_build_needs' diff --git a/db/schema_migrations/20230307091216 b/db/schema_migrations/20230307091216 new file mode 100644 index 00000000000..4727747daa7 --- /dev/null +++ b/db/schema_migrations/20230307091216 @@ -0,0 +1 @@ +0c13f0053959e1c3e66f0c87d55d4a9190b36d61f67bb1b3ec32f73fa699c961
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 39311eb44d4..6b74fff0ae3 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -29154,6 +29154,8 @@ CREATE INDEX index_abuse_reports_on_status_and_updated_at ON abuse_reports USING CREATE INDEX index_abuse_reports_on_status_category_and_id ON abuse_reports USING btree (status, category, id); +CREATE INDEX index_abuse_reports_on_status_reporter_id_and_id ON abuse_reports USING btree (status, reporter_id, id); + CREATE INDEX index_abuse_reports_on_user_id ON abuse_reports USING btree (user_id); CREATE UNIQUE INDEX "index_achievements_on_namespace_id_LOWER_name" ON achievements USING btree (namespace_id, lower(name)); |