Sha256: 412991279b1f0f8729c1df4d07e016e29070a79b99d78308506b7f608d44d843

Contents?: true

Size: 1.96 KB

Versions: 94

Compression:

Stored size: 1.96 KB

Contents

class CreateSpudUsers < ActiveRecord::Migration
  def change
    create_table :spud_users do |t|
      
      t.string :first_name
      t.string :last_name
      t.boolean :super_admin
      t.string    :login,               :null => false                # optional, you can use email instead, or both
      t.string    :email,               :null => false                # optional, you can use login instead, or both
      t.string    :crypted_password,    :null => false                # optional, see below
      t.string    :password_salt,       :null => false                # optional, but highly recommended
      t.string    :persistence_token,   :null => false                # required
      t.string    :single_access_token, :null => false                # optional, see Authlogic::Session::Params
      t.string    :perishable_token,    :null => false                # optional, see Authlogic::Session::Perishability

      # Magic columns, just like ActiveRecord's created_at and updated_at. These are automatically maintained by Authlogic if they are present.
      t.integer   :login_count,         :null => false, :default => 0 # optional, see Authlogic::Session::MagicColumns
      t.integer   :failed_login_count,  :null => false, :default => 0 # optional, see Authlogic::Session::MagicColumns
      t.datetime  :last_request_at                                    # optional, see Authlogic::Session::MagicColumns
      t.datetime  :current_login_at                                   # optional, see Authlogic::Session::MagicColumns
      t.datetime  :last_login_at                                      # optional, see Authlogic::Session::MagicColumns
      t.string    :current_login_ip                                   # optional, see Authlogic::Session::MagicColumns
      t.string    :last_login_ip                                      # optional, see Authlogic::Session::MagicColumns
      t.timestamps
    end
    add_index :spud_users,:login
    add_index :spud_users,:email
  end
end

Version data entries

94 entries across 94 versions & 2 rubygems

Version Path
spud_core-0.9.2 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.9.1 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.9.0 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.28 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.27 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.26 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.25 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.24 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.23 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.22 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.21 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.20 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.19 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.18 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.17 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.16 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.15 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.13 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.12 db/migrate/20111214161146_create_spud_users.rb
spud_core-0.8.11 db/migrate/20111214161146_create_spud_users.rb