tab/db/migrate/20190508204808_rpush_3_0_0_updates.rb

12 lines
445 B
Ruby
Raw Normal View History

2019-05-08 22:50:19 +02:00
class Rpush300Updates < ActiveRecord::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[5.0] : ActiveRecord::Migration
def self.up
add_column :rpush_notifications, :mutable_content, :boolean, default: false
change_column :rpush_notifications, :sound, :string, default: nil
end
def self.down
remove_column :rpush_notifications, :mutable_content
change_column :rpush_notifications, :sound, :string, default: 'default'
end
end