076_allow_null_position.rb 623 Bytes
Newer Older
1
class AllowNullPosition < ActiveRecord::Migration[4.2]
2
  def self.up
3 4
    Enumeration.reset_column_information

5
    # removes the 'not null' constraint on position fields
6 7 8 9 10
    change_column :issue_statuses, :position, :integer, :default => 1, :null => true
    change_column :roles, :position, :integer, :default => 1, :null => true
    change_column :trackers, :position, :integer, :default => 1, :null => true
    change_column :boards, :position, :integer, :default => 1, :null => true
    change_column :enumerations, :position, :integer, :default => 1, :null => true
11 12 13 14 15 16
  end

  def self.down
    # nothing to do
  end
end