Class: AddRpush::CreateRapnsFeedback
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AddRpush::CreateRapnsFeedback
- Defined in:
- lib/generators/templates/add_rpush.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
85 86 87 88 89 90 |
# File 'lib/generators/templates/add_rpush.rb', line 85 def self.down if index_name_exists?(:rapns_feedback, :index_rapns_feedback_on_device_token, true) remove_index :rapns_feedback, name: :index_rapns_feedback_on_device_token end drop_table :rapns_feedback end |
.up ⇒ Object
75 76 77 78 79 80 81 82 83 |
# File 'lib/generators/templates/add_rpush.rb', line 75 def self.up create_table :rapns_feedback do |t| t.string :device_token, null: false, limit: 64 t. :failed_at, null: false t. end add_index :rapns_feedback, :device_token end |