retrospring/db/migrate/20220909161550_rpush_3_1_1_updates.rb

18 lines
625 B
Ruby
Raw Normal View History

2022-09-11 23:20:10 +02:00
# frozen_string_literal: true
2022-09-09 18:29:40 +02:00
class Rpush311Updates < ActiveRecord::Migration[5.0]
def self.up
change_table :rpush_notifications do |t|
2022-09-11 23:20:10 +02:00
t.remove_index name: "index_rpush_notifications_multi"
t.index %i[delivered failed processing deliver_after created_at], name: "index_rpush_notifications_multi", where: "NOT delivered AND NOT failed"
2022-09-09 18:29:40 +02:00
end
end
def self.down
change_table :rpush_notifications do |t|
2022-09-11 23:20:10 +02:00
t.remove_index name: "index_rpush_notifications_multi"
t.index %i[delivered failed], name: "index_rpush_notifications_multi", where: "NOT delivered AND NOT failed"
2022-09-09 18:29:40 +02:00
end
end
end