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:
authorGitLab Bot <gitlab-bot@gitlab.com>2024-01-16 13:42:19 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2024-01-16 13:42:19 +0300
commit84d1bd786125c1c14a3ba5f63e38a4cc736a9027 (patch)
treef550fa965f507077e20dbb6d61a8269a99ef7107 /db/post_migrate/20231215130625_schedule_index_to_events_author_group_action_target_type_created_at.rb
parent3a105e36e689f7b75482236712f1a47fd5a76814 (diff)
Add latest changes from gitlab-org/gitlab@16-8-stable-eev16.8.0-rc42
Diffstat (limited to 'db/post_migrate/20231215130625_schedule_index_to_events_author_group_action_target_type_created_at.rb')
-rw-r--r--db/post_migrate/20231215130625_schedule_index_to_events_author_group_action_target_type_created_at.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/post_migrate/20231215130625_schedule_index_to_events_author_group_action_target_type_created_at.rb b/db/post_migrate/20231215130625_schedule_index_to_events_author_group_action_target_type_created_at.rb
new file mode 100644
index 00000000000..063aff58176
--- /dev/null
+++ b/db/post_migrate/20231215130625_schedule_index_to_events_author_group_action_target_type_created_at.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class ScheduleIndexToEventsAuthorGroupActionTargetTypeCreatedAt < Gitlab::Database::Migration[2.2]
+ milestone '16.8'
+
+ INDEX_NAME = 'index_events_author_id_group_id_action_target_type_created_at'
+ COLUMNS = [:author_id, :group_id, :action, :target_type, :created_at]
+
+ # TODO: Index to be created synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/435524
+ def up
+ prepare_async_index :events, COLUMNS, name: INDEX_NAME
+ end
+
+ def down
+ unprepare_async_index :events, COLUMNS, name: INDEX_NAME
+ end
+end