Class: Rpush311Updates

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/templates/rpush_3_1_1_updates.rb

Class Method Summary collapse

Class Method Details

.downObject



9
10
11
12
13
14
# File 'lib/generators/templates/rpush_3_1_1_updates.rb', line 9

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

.upObject



2
3
4
5
6
7
# File 'lib/generators/templates/rpush_3_1_1_updates.rb', line 2

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