Class: MakeDeviceTokenIndexNonunique

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

Class Method Summary collapse

Class Method Details

.downObject


7
8
9
10
# File 'lib/generators/apn_on_rails/install/templates/011_make_device_token_index_nonunique.rb', line 7

def self.down
  remove_index :apn_devices, :column => :token
  add_index :apn_devices, :token, :unique => true
end

.upObject


2
3
4
5
# File 'lib/generators/apn_on_rails/install/templates/011_make_device_token_index_nonunique.rb', line 2

def self.up
  remove_index :apn_devices, :column => :token
  add_index :apn_devices, :token
end