Sha256: 0b12850e6e9189836a7c97ffd29da0916cab5ee8c7e4f7672db9c6a9c99ac83d

Contents?: true

Size: 463 Bytes

Versions: 17

Compression:

Stored size: 463 Bytes

Contents

class AddBruteForceProtectionToUsers < ActiveRecord::CompatibleLegacyMigration.migration_class
  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

17 entries across 17 versions & 1 rubygems

Version Path
sorcery-0.17.0 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.16.5 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.16.4 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.16.3 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.16.2 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.16.1 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.15.1 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.16.0 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.15.0 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.14.0 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.13.0 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.12.0 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.11.0 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.10.3 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.10.2 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.10.1 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb
sorcery-0.10.0 spec/rails_app/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb