summaryrefslogtreecommitdiff
path: root/db/post_migrate/20190611161642_add_index_to_events_and_audit_events_created_at_author_id.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20190611161642_add_index_to_events_and_audit_events_created_at_author_id.rb')
-rw-r--r--db/post_migrate/20190611161642_add_index_to_events_and_audit_events_created_at_author_id.rb25
1 files changed, 0 insertions, 25 deletions
diff --git a/db/post_migrate/20190611161642_add_index_to_events_and_audit_events_created_at_author_id.rb b/db/post_migrate/20190611161642_add_index_to_events_and_audit_events_created_at_author_id.rb
deleted file mode 100644
index 5b9afbe128c..00000000000
--- a/db/post_migrate/20190611161642_add_index_to_events_and_audit_events_created_at_author_id.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-# See http://doc.gitlab.com/ce/development/migration_style_guide.html
-# for more information on how to write migrations for GitLab.
-
-class AddIndexToEventsAndAuditEventsCreatedAtAuthorId < ActiveRecord::Migration[5.1]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
- INDEX_NAME = 'analytics_index_%s_on_created_at_and_author_id'
- EVENTS_INDEX_NAME = (INDEX_NAME % 'events')
- AUDIT_EVENTS_INDEX_NAME = (INDEX_NAME % 'audit_events')
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :events, [:created_at, :author_id], name: EVENTS_INDEX_NAME
- add_concurrent_index :audit_events, [:created_at, :author_id], name: AUDIT_EVENTS_INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :events, EVENTS_INDEX_NAME
- remove_concurrent_index_by_name :audit_events, AUDIT_EVENTS_INDEX_NAME
- end
-end