Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20201221124036_add_devops_snapshot_index.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 85001e9abcf25caa4c22e3ed860c877852f4125f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

class AddDevopsSnapshotIndex < ActiveRecord::Migration[6.0]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  INDEX_NAME = 'index_on_snapshots_segment_id_end_time'

  def up
    add_concurrent_index :analytics_devops_adoption_snapshots, [:segment_id, :end_time], name: INDEX_NAME
  end

  def down
    remove_concurrent_index_by_name :analytics_devops_adoption_snapshots, INDEX_NAME
  end
end