summaryrefslogtreecommitdiff
path: root/db/migrate/20200306170531_add_index_on_author_id_and_created_at_to_todos.rb
blob: d0d31ca7c52ce52bedcae0d4eb943e4bcbd5d4d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true
class AddIndexOnAuthorIdAndCreatedAtToTodos < ActiveRecord::Migration[6.0]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    add_concurrent_index :todos, [:author_id, :created_at]
  end

  def down
    remove_concurrent_index :todos, [:author_id, :created_at]
  end
end