Class: DeviseCreateAdmins
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- DeviseCreateAdmins
- Defined in:
- lib/generators/jabe/templates/migrations/devise_create_admins.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
23 24 25 |
# File 'lib/generators/jabe/templates/migrations/devise_create_admins.rb', line 23 def self.down drop_table :admins end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/generators/jabe/templates/migrations/devise_create_admins.rb', line 2 def self.up create_table(:admins) do |t| t.database_authenticatable :null => false t.recoverable t.rememberable t.trackable # t.confirmable # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both # t.token_authenticatable t. end add_index :admins, :email, :unique => true add_index :admins, :reset_password_token, :unique => true # add_index :admins, :confirmation_token, :unique => true # add_index :admins, :unlock_token, :unique => true end |