summaryrefslogtreecommitdiffstats
path: root/db/migrate/20130217094251_remove_issues_default_fk_values.rb
blob: 44370612a1431e70313ad160d8bb120d4e1f3534 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: false

class RemoveIssuesDefaultFkValues < ActiveRecord::Migration[4.2]
  def up
    change_column_default :issues, :tracker_id, nil
    change_column_default :issues, :project_id, nil
    change_column_default :issues, :status_id, nil
    change_column_default :issues, :assigned_to_id, nil
    change_column_default :issues, :priority_id, nil
    change_column_default :issues, :author_id, nil
  end

  def down
    change_column_default :issues, :tracker_id, 0
    change_column_default :issues, :project_id, 0
    change_column_default :issues, :status_id, 0
    change_column_default :issues, :assigned_to_id, 0
    change_column_default :issues, :priority_id, 0
    change_column_default :issues, :author_id, 0
  end
end