Sha256: e924ee510147a4e0c5c5a07316d8ef51c025c21addb1c8c0207974116f86eb6e

Contents?: true

Size: 887 Bytes

Versions: 1

Compression:

Stored size: 887 Bytes

Contents

class CreateUsers < ActiveRecord::Migration
  def self.up
    create_table :users do |t|
      t.string   :full_name,           :null => false
      t.string   :email,               :null => false
      t.string   :crypted_password,    :null => false
      t.string   :password_salt,       :null => false
      t.string   :persistence_token,   :null => false
      t.string   :single_access_token, :null => false
      t.string   :perishable_token,    :null => false

      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   :role

      t.timestamps
    end
  end

  def self.down
    drop_table :users
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tiny_core_users-0.0.1 rails_generators/tiny_user/templates/create_users.rb