2012-03-29 21:34:22 +01:00
|
|
|
# -*- encoding : utf-8 -*-
|
2012-01-27 14:58:38 +00:00
|
|
|
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
|
|
|
|
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
|