Sha256: ce518914f2c60af61698cc31e2b7788a7052f4fc782cbda1a3eebe0d6ece9c75

Contents?: true

Size: 333 Bytes

Versions: 14

Compression:

Stored size: 333 Bytes

Contents

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

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
sorcery-0.7.0 lib/generators/sorcery_migration/templates/brute_force_protection.rb
sorcery-0.6.1 lib/generators/sorcery_migration/templates/brute_force_protection.rb
sorcery-0.6.0 lib/generators/sorcery_migration/templates/brute_force_protection.rb
sorcery-0.5.30 lib/generators/sorcery_migration/templates/brute_force_protection.rb
sorcery-0.5.3 lib/generators/sorcery_migration/templates/brute_force_protection.rb
sorcery-0.5.21 lib/generators/sorcery_migration/templates/brute_force_protection.rb
sorcery-0.5.2 lib/generators/sorcery_migration/templates/brute_force_protection.rb
sorcery-0.5.1 lib/generators/sorcery_migration/templates/brute_force_protection.rb
sorcery-0.5.0 lib/generators/sorcery_migration/templates/brute_force_protection.rb
sorcery-0.4.2 lib/generators/sorcery_migration/templates/brute_force_protection.rb
sorcery-0.4.1 lib/generators/sorcery_migration/templates/brute_force_protection.rb
sorcery-0.4.0 lib/generators/sorcery_migration/templates/brute_force_protection.rb
sorcery-0.3.1 lib/generators/sorcery_migration/templates/brute_force_protection.rb
sorcery-0.3.0 lib/generators/sorcery_migration/templates/brute_force_protection.rb