Class: KryptoniteCreateUsers

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/kryptonite/install/templates/db/migrate/kryptonite_create_users.rb

Class Method Summary collapse

Class Method Details

.downObject



27
28
29
# File 'lib/generators/kryptonite/install/templates/db/migrate/kryptonite_create_users.rb', line 27

def self.down
  drop_table :kryptonite_users
end

.upObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/generators/kryptonite/install/templates/db/migrate/kryptonite_create_users.rb', line 3

def self.up
  create_table :kryptonite_users do |t|   
    t.string    :login, :null => false
    t.string    :name
    t.string    :email
    t.string    :language
    t.integer   :access_level, :null => false, :default => 0
    t.string    :crypted_password, :null => false
    t.string    :password_salt, :null => false
    t.string    :persistence_token
    t.string    :single_access_token
    t.string    :perishable_token
    t.integer   :login_count, :null => false, :default => 0
    t.integer   :failed_login_count, :null => false, :default => 0
    t.datetime  :last_request_at
    t.datetime  :current_login_at
    t.datetime  :last_login_at
    t.string    :current_login_ip
    t.string    :last_login_ip
    t.string    :time_zone
    t.timestamps
  end
end