Sha256: 0bfc69c9a5fff0e43632bd9f964e81aca92f85f10c29e394da4dc10c5f31d4e5

Contents?: true

Size: 939 Bytes

Versions: 15

Compression:

Stored size: 939 Bytes

Contents

class CreateUsers < ActiveRecord::Migration
  def up
    create_table :users do |t|
      t.string :first_name
      t.string :last_name
      t.string :username
      t.string :email
      t.string :crypted_password
      t.string :persistence_token
      t.string :api_key
      t.integer :role_id
      t.datetime :last_session_at
      t.string :last_session_ip
      t.integer :session_count, :default => 0
      t.integer :failed_auth_count, :default => 0      
      t.integer :created_by, :default => 0
      t.integer :updated_by, :default => 0
      t.datetime :created_at
      t.datetime :updated_at
      t.boolean :active, :default => true
      t.timestamps :null => true
    end
    
    add_index :users, :username
    add_index :users, :first_name
    add_index :users, :last_name
    add_index :users, :email
    add_index :users, :api_key
    add_index :users, :role_id
  end

  def down
    drop_table :users
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
challah-0.5.4 db/migrate/20120127150433_create_users.rb
challah-0.5.3 db/migrate/20120127150433_create_users.rb
challah-0.5.2 db/migrate/20120127150433_create_users.rb
challah-0.5.1 db/migrate/20120127150433_create_users.rb
challah-0.5.0 db/migrate/20120127150433_create_users.rb
challah-0.4.1 db/migrate/20120127150433_create_users.rb
challah-0.4.0 db/migrate/20120127150433_create_users.rb
challah-0.3.5 db/migrate/20120127150433_create_users.rb
challah-0.3.4 db/migrate/20120127150433_create_users.rb
challah-0.3.3 db/migrate/20120127150433_create_users.rb
challah-0.3.2 db/migrate/20120127150433_create_users.rb
challah-0.3.1 db/migrate/20120127150433_create_users.rb
challah-0.3.0 db/migrate/20120127150433_create_users.rb
challah-0.2.1 db/migrate/20120127150433_create_users.rb
challah-0.2.0 db/migrate/20120127150433_create_users.rb