OSDN Git Service

import all source code
[pettanr/pettanr.git] / db / migrate / 20111206091950_devise_create_authors.rb
1 class DeviseCreateAuthors < ActiveRecord::Migration
2   def change
3     create_table(:authors) do |t|
4       t.string :name\r
5       t.database_authenticatable :null => false
6       t.recoverable
7       t.rememberable
8       t.trackable
9       t.token_authenticatable
10       t.confirmable
11
12       # t.encryptable
13       # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
14
15
16       t.timestamps
17     end
18
19     add_index :authors, :email,                :unique => true
20     add_index :authors, :reset_password_token, :unique => true
21     add_index :authors, :confirmation_token,   :unique => true
22     # add_index :authors, :unlock_token,         :unique => true
23     add_index :authors, :authentication_token, :unique => true
24   end
25
26 end