rosa-build/db/migrate/20120127141211_add_confirma...

16 lines
506 B
Ruby
Raw Normal View History

class AddConfirmableToUsers < ActiveRecord::Migration
def self.up
add_column :users, :confirmation_token, :string
add_column :users, :confirmed_at, :datetime
add_column :users, :confirmation_sent_at, :datetime
2014-01-21 04:51:49 +00:00
add_index :users, :confirmation_token, unique: true
end
def self.down
remove_index :users, :confirmation_token
remove_column :users, :confirmation_sent_at
remove_column :users, :confirmed_at
remove_column :users, :confirmation_token
end
end