Class: AddRpush::AddAdm
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AddRpush::AddAdm
- Defined in:
- lib/generators/templates/add_rpush.rb
Defined Under Namespace
Modules: Rapns
Class Method Summary collapse
Class Method Details
.down ⇒ Object
266 267 268 269 270 271 272 273 |
# File 'lib/generators/templates/add_rpush.rb', line 266 def self.down AddAdm::Rapns::Notification.where(type: 'Rapns::Adm::Notification').delete_all remove_column :rapns_apps, :client_id remove_column :rapns_apps, :client_secret remove_column :rapns_apps, :access_token remove_column :rapns_apps, :access_token_expiration end |
.up ⇒ Object
259 260 261 262 263 264 |
# File 'lib/generators/templates/add_rpush.rb', line 259 def self.up add_column :rapns_apps, :client_id, :string, null: true add_column :rapns_apps, :client_secret, :string, null: true add_column :rapns_apps, :access_token, :string, null: true add_column :rapns_apps, :access_token_expiration, :datetime, null: true end |