Class: CreateApnApps

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/apn_on_rails/install/templates/004_create_apn_apps.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.downObject


14
15
16
17
# File 'lib/generators/apn_on_rails/install/templates/004_create_apn_apps.rb', line 14

def self.down
  drop_table :apn_apps
  remove_column :apn_devices, :app_id
end

.upObject


2
3
4
5
6
7
8
9
10
11
12
# File 'lib/generators/apn_on_rails/install/templates/004_create_apn_apps.rb', line 2

def self.up
  create_table :apn_apps do |t|
    t.text :apn_dev_cert
    t.text :apn_prod_cert

    t.timestamps
  end

  add_column :apn_devices, :app_id, :integer
  
end