Sha256: 1d33be1cf1703ca1a76ff924dd2f22ae0c45ea2b745b7f24db551e55efdf41ba

Contents?: true

Size: 439 Bytes

Versions: 15

Compression:

Stored size: 439 Bytes

Contents

class AddBruteForceProtectionToUsers < ActiveRecord::Migration
  def self.up
    add_column :users, :failed_logins_count, :integer, :default => 0
    add_column :users, :lock_expires_at, :datetime, :default => nil
    add_column :users, :unlock_token, :string, :default => nil
  end

  def self.down
    remove_column :users, :unlock_token
    remove_column :users, :lock_expires_at
    remove_column :users, :failed_logins_count
  end
end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
sorcery-0.9.1 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.9.0 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
cbsorcery-0.8.6 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
cb-sorcery-0.8.6 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.8.6 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.8.5 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.8.4 spec/rails3/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.8.2 spec/rails3/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.8.1 spec/rails3/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.8.0 spec/rails3/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.7.13 spec/rails3/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.7.12 spec/rails3/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.7.11 spec/rails3/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.7.10 spec/rails3/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.7.9 spec/rails3/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb