summaryrefslogtreecommitdiffstats
path: root/db/migrate/20160416072926_remove_position_defaults.rb
blob: 80e894e30ea8bac57917df45728905deafdfc8e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: false

class RemovePositionDefaults < ActiveRecord::Migration[4.2]
  def up
    [Board, CustomField, Enumeration, IssueStatus, Role, Tracker].each do |klass|
      change_column klass.table_name, :position, :integer, :default => nil
    end
  end

  def down
    [Board, CustomField, Enumeration, IssueStatus, Role, Tracker].each do |klass|
      change_column klass.table_name, :position, :integer, :default => 1
    end
  end
end