summaryrefslogtreecommitdiff
path: root/db/migrate/20161018024550_remove_priority_from_labels.rb
blob: bc25a43526cc267cdef169678f3ddea7a8779add (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# rubocop:disable Migration/RemoveColumn
class RemovePriorityFromLabels < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = true
  DOWNTIME_REASON = 'This migration removes an existing column'

  disable_ddl_transaction!

  def up
    remove_column :labels, :priority, :integer, index: true
  end

  def down
    add_column :labels, :priority, :integer
    add_concurrent_index :labels, :priority
  end
end