Class: AlterApnNotifications
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AlterApnNotifications
- Defined in:
- lib/generators/apn_on_rails/install/templates/010_alter_apn_notifications.rb
Overview
:nodoc:
Defined Under Namespace
Modules: APN
Class Method Summary collapse
Class Method Details
.down ⇒ Object
15 16 17 18 19 |
# File 'lib/generators/apn_on_rails/install/templates/010_alter_apn_notifications.rb', line 15 def self.down if APN::Notification.column_names.include?("custom_properties") remove_column :apn_notifications, :custom_properties end end |
.up ⇒ Object
9 10 11 12 13 |
# File 'lib/generators/apn_on_rails/install/templates/010_alter_apn_notifications.rb', line 9 def self.up unless APN::Notification.column_names.include?("custom_properties") add_column :apn_notifications, :custom_properties, :text end end |