Class: CreateC2dmDevices

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

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.downObject



13
14
15
# File 'lib/generators/templates/c2dm_migrations/create_c2dm_devices.rb', line 13

def self.down
  drop_table :c2dm_devices
end

.upObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/generators/templates/c2dm_migrations/create_c2dm_devices.rb', line 2

def self.up
  create_table :c2dm_devices do |t|
    t.string :registration_id, :size => 120, :null => false
    t.datetime :last_registered_at

    t.timestamps
  end

  add_index :c2dm_devices, :registration_id, :unique => true
end