tab/db/migrate/20190508204807_rpush_2_7_0_updates.rb

13 lines
385 B
Ruby
Raw Permalink Normal View History

2019-05-08 22:50:19 +02:00
class Rpush270Updates < ActiveRecord::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[5.0] : ActiveRecord::Migration
def self.up
change_column :rpush_notifications, :alert, :text
add_column :rpush_notifications, :notification, :text
end
def self.down
change_column :rpush_notifications, :alert, :string
remove_column :rpush_notifications, :notification
end
end