Class: CreateC2dmNotifications

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/templates/c2dm_migrations/create_c2dm_notifications.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.downObject



17
18
19
# File 'lib/generators/templates/c2dm_migrations/create_c2dm_notifications.rb', line 17

def self.down
  drop_table :c2dm_notifications
end

.upObject



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/generators/templates/c2dm_migrations/create_c2dm_notifications.rb', line 3

def self.up

  create_table :c2dm_notifications do |t|
    t.integer :device_id, :null => false
    t.string :collapse_key, :null => false
    t.text :data
    t.boolean :delay_while_idle
    t.datetime :sent_at
    t.timestamps
  end
  
  add_index :c2dm_notifications, :device_id
end