Class: DeviseCreateUsers
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- DeviseCreateUsers
- Defined in:
- lib/generators/lab/setup/templates/devise/devise_migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
23 24 25 |
# File 'lib/generators/lab/setup/templates/devise/devise_migration.rb', line 23 def self.down drop_table :users 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/lab/setup/templates/devise/devise_migration.rb', line 2 def self.up create_table(:users) do |t| t.database_authenticatable :null => false t.recoverable t.rememberable t.trackable t.integer :roles_mask, :default => 1 # t.confirmable # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both # t.token_authenticatable t. end add_index :users, :email, :unique => true add_index :users, :reset_password_token, :unique => true # add_index :users, :confirmation_token, :unique => true # add_index :users, :unlock_token, :unique => true end |