Sha256: 5bb989e870bdaf1177032024864e39437ab294521c77a0e52f638815600c0e90

Contents?: true

Size: 949 Bytes

Versions: 13

Compression:

Stored size: 949 Bytes

Contents

class DeviseCreateAdminUsers < ActiveRecord::Migration
  def self.up
    create_table(:admin_users) do |t|
      t.database_authenticatable :null => false
      t.recoverable
      t.rememberable
      t.trackable

      # t.encryptable
      # t.confirmable
      # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
      # t.token_authenticatable


      t.timestamps
    end

    # Create a default user
    AdminUser.create!(:email => 'admin@example.com', :password => 'password', :password_confirmation => 'password')

    add_index :admin_users, :email,                :unique => true
    add_index :admin_users, :reset_password_token, :unique => true
    # add_index :admin_users, :confirmation_token,   :unique => true
    # add_index :admin_users, :unlock_token,         :unique => true
    # add_index :admin_users, :authentication_token, :unique => true
  end

  def self.down
    drop_table :admin_users
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rich-1.2.0 test/dummy/db/migrate/20111014123344_devise_create_admin_users.rb
rich-1.1.0 test/dummy/db/migrate/20111014123344_devise_create_admin_users.rb
rich-1.0.3 test/dummy/db/migrate/20111014123344_devise_create_admin_users.rb
rich-1.0.2 test/dummy/db/migrate/20111014123344_devise_create_admin_users.rb
rich-1.0.1 test/dummy/db/migrate/20111014123344_devise_create_admin_users.rb
rich-1.0.0 test/dummy/db/migrate/20111014123344_devise_create_admin_users.rb
rich-0.0.8 test/dummy/db/migrate/20111014123344_devise_create_admin_users.rb
rich-0.0.7 test/dummy/db/migrate/20111014123344_devise_create_admin_users.rb
rich-0.0.6 test/dummy/db/migrate/20111014123344_devise_create_admin_users.rb
rich-0.0.4 test/dummy/db/migrate/20111014123344_devise_create_admin_users.rb
rich-0.0.3 test/dummy/db/migrate/20111014123344_devise_create_admin_users.rb
rich-0.0.2 test/dummy/db/migrate/20111014123344_devise_create_admin_users.rb
rich-0.0.1 test/dummy/db/migrate/20111014123344_devise_create_admin_users.rb