Class: CreateGcmDevices
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateGcmDevices
- Defined in:
- lib/generators/templates/gcm_migrations/create_gcm_devices.rb
Overview
:nodoc:
Class Method Summary collapse
Class Method Details
.down ⇒ Object
13 14 15 |
# File 'lib/generators/templates/gcm_migrations/create_gcm_devices.rb', line 13 def self.down drop_table :gcm_devices end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/generators/templates/gcm_migrations/create_gcm_devices.rb', line 2 def self.up create_table :gcm_devices do |t| t.string :registration_id, :size => 120, :null => false t.datetime :last_registered_at t. end add_index :gcm_devices, :registration_id, :unique => true end |