Sha256: e6a02738ef2728b720d9ecdded9488a3e7145563237b26a944317651508a4c1f

Contents?: true

Size: 532 Bytes

Versions: 7

Compression:

Stored size: 532 Bytes

Contents

class SorceryActivityLogging < <%= migration_class_name %>
  def change
    add_column :<%= tableized_model_class %>, :last_login_at,     :datetime, default: nil
    add_column :<%= tableized_model_class %>, :last_logout_at,    :datetime, default: nil
    add_column :<%= tableized_model_class %>, :last_activity_at,  :datetime, default: nil
    add_column :<%= tableized_model_class %>, :last_login_from_ip_address, :string, default: nil

    add_index :<%= tableized_model_class %>, [:last_logout_at, :last_activity_at]
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sorcery-0.17.0 lib/generators/sorcery/templates/migration/activity_logging.rb
sorcery-0.16.5 lib/generators/sorcery/templates/migration/activity_logging.rb
sorcery-0.16.4 lib/generators/sorcery/templates/migration/activity_logging.rb
sorcery-0.16.3 lib/generators/sorcery/templates/migration/activity_logging.rb
sorcery-0.16.2 lib/generators/sorcery/templates/migration/activity_logging.rb
sorcery-0.16.1 lib/generators/sorcery/templates/migration/activity_logging.rb
sorcery-0.16.0 lib/generators/sorcery/templates/migration/activity_logging.rb