Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Renamed new migration.

  • Loading branch information...
commit 3cbb92b67b444da299afd219f42b64fa978f66a1 1 parent 1bdf183
@markbates markbates authored
View
2  apn_on_rails.gemspec
@@ -2,7 +2,7 @@
Gem::Specification.new do |s|
s.name = %q{apn_on_rails}
- s.version = "0.3.0.20090731174823"
+ s.version = "0.3.0.20090731234417"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["markbates"]
View
8 ...igrations/003_add_registered_at_to_apn_devices.rb → ...templates/apn_migrations/003_alter_apn_devices.rb
@@ -1,4 +1,4 @@
-class AddRegisteredAtToApnDevices < ActiveRecord::Migration # :nodoc:
+class AlterApnDevices < ActiveRecord::Migration # :nodoc:
module APN # :nodoc:
class Device < ActiveRecord::Base # :nodoc:
@@ -13,11 +13,13 @@ def self.up
device.last_registered_at = device.created_at
device.save!
end
-
- add_index :apn_devices, :token
+ change_column :apn_devices, :token, :string, :size => 100, :null => false
+ add_index :apn_devices, :token, :unique => true
end
def self.down
+ change_column :apn_devices, :token, :string
+ remove_index :apn_devices, :column => :token
remove_column :apn_devices, :last_registered_at
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.