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>2020-03-10 12:08:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-10 12:08:10 +0300
commit82fa8a3d1e8466ef36b58604d20fcc145ea12118 (patch)
treec5c0286537405c2fa7719ecce3ed0d73d947c555 /db/migrate/20200306160521_add_index_on_author_id_and_created_at_to_events.rb
parent232655bf32cd474d54de357b65ef43d77271117c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20200306160521_add_index_on_author_id_and_created_at_to_events.rb')
-rw-r--r--db/migrate/20200306160521_add_index_on_author_id_and_created_at_to_events.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20200306160521_add_index_on_author_id_and_created_at_to_events.rb b/db/migrate/20200306160521_add_index_on_author_id_and_created_at_to_events.rb
new file mode 100644
index 00000000000..3328a14bb65
--- /dev/null
+++ b/db/migrate/20200306160521_add_index_on_author_id_and_created_at_to_events.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddIndexOnAuthorIdAndCreatedAtToEvents < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :events, [:author_id, :created_at]
+ end
+
+ def down
+ remove_concurrent_index :events, [:author_id, :created_at]
+ end
+end