blob: 7146c6c953729142a03bfe7628c115699a80e75c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
# frozen_string_literal: true
class RemoveNullConstraintOnScheduleFromEscalationRules < ActiveRecord::Migration[6.1]
def up
change_column_null :incident_management_escalation_rules, :oncall_schedule_id, true
end
def down
exec_query 'DELETE FROM incident_management_escalation_rules WHERE oncall_schedule_id IS NULL'
change_column_null :incident_management_escalation_rules, :oncall_schedule_id, false
end
end
|