Retrospring/db/migrate/20220909161550_rpush_3_1_1_...

16 lines
602 B
Ruby
Raw Normal View History

2022-09-09 09:29:40 -07:00
class Rpush311Updates < ActiveRecord::Migration[5.0]
def self.up
change_table :rpush_notifications do |t|
t.remove_index name: 'index_rpush_notifications_multi'
t.index [:delivered, :failed, :processing, :deliver_after, :created_at], name: 'index_rpush_notifications_multi', where: 'NOT delivered AND NOT failed'
end
end
def self.down
change_table :rpush_notifications do |t|
t.remove_index name: 'index_rpush_notifications_multi'
t.index [:delivered, :failed], name: 'index_rpush_notifications_multi', where: 'NOT delivered AND NOT failed'
end
end
end