Class: CreateIospnNotifications
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateIospnNotifications
- Defined in:
- lib/generators/templates/notification_migration.rb
Overview
:nodoc:
Class Method Summary collapse
Class Method Details
.down ⇒ Object
21 22 23 |
# File 'lib/generators/templates/notification_migration.rb', line 21 def self.down drop_table :iospn_notifications end |
.up ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/generators/templates/notification_migration.rb', line 3 def self.up create_table :iospn_notifications do |t| t.integer :device_id, :null => false t.integer :errors_nb, :default => 0 # used for storing errors from apple feedbacks t.string :device_language, :size => 5 # if you don't want to send localized strings t.string :sound t.string :alert, :size => 150 t.integer :badge t.text :custom_properties t.datetime :sent_at t. end add_index :iospn_notifications, :device_id add_index :iospn_notifications, :sent_at end |