Sha256: db7435c75b6346ca12303b8c051cbddbda3a59a7f5c1f321846a1710177fa7e7

Contents?: true

Size: 432 Bytes

Versions: 7

Compression:

Stored size: 432 Bytes

Contents

class SorceryBruteForceProtection < <%= migration_class_name %>
  def change
    add_column :<%= model_class_name.tableize %>, :failed_logins_count, :integer, :default => 0
    add_column :<%= model_class_name.tableize %>, :lock_expires_at, :datetime, :default => nil
    add_column :<%= model_class_name.tableize %>, :unlock_token, :string, :default => nil

    add_index :<%= model_class_name.tableize %>, :unlock_token
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sorcery-0.13.0 lib/generators/sorcery/templates/migration/brute_force_protection.rb
sorcery-0.12.0 lib/generators/sorcery/templates/migration/brute_force_protection.rb
sorcery-0.11.0 lib/generators/sorcery/templates/migration/brute_force_protection.rb
sorcery-0.10.3 lib/generators/sorcery/templates/migration/brute_force_protection.rb
sorcery-0.10.2 lib/generators/sorcery/templates/migration/brute_force_protection.rb
sorcery-0.10.1 lib/generators/sorcery/templates/migration/brute_force_protection.rb
sorcery-0.10.0 lib/generators/sorcery/templates/migration/brute_force_protection.rb