Class: RadminCreateUsers

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/radmin/templates/migrations/01_radmin_create_users.rb

Class Method Summary collapse

Class Method Details

.downObject



14
15
16
# File 'lib/generators/radmin/templates/migrations/01_radmin_create_users.rb', line 14

def self.down
  drop_table :radmin_users
end

.upObject



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/generators/radmin/templates/migrations/01_radmin_create_users.rb', line 2

def self.up
  create_table :radmin_users do |t|
    t.database_authenticatable
    t.recoverable
    t.trackable
    t.timestamps
  end
  
  add_index :radmin_users, :email, :unique => true
  add_index :radmin_users, :reset_password_token, :unique => true
end