Class: CreateUsers

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/devowd/templates/migrations/user_migration.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/generators/devowd/templates/migrations/user_migration.rb', line 2

def change
  create_table :users do |t|
    t.string :fname
    t.string :lname
    t.string :mname
    t.boolean :activated, default: false
    t.string :token

    ## Database authenticatable
    t.string :email,              :null => false, :default => ""
    t.string :encrypted_password, :null => false, :default => ""

    ## Rememberable
    t.datetime :remember_created_at

    ## Trackable
    t.integer  :sign_in_count, :default => 0, :null => false
    t.datetime :current_sign_in_at
    t.datetime :last_sign_in_at
    t.string   :current_sign_in_ip
    t.string   :last_sign_in_ip
  end
end