Sha256: bd3700482ce4a74c34197ac9956ebfcb706588da6a112513d89004475a6dd06a

Contents?: true

Size: 564 Bytes

Versions: 7

Compression:

Stored size: 564 Bytes

Contents

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

    add_index :<%= model_class_name.tableize %>, [:last_logout_at, :last_activity_at]
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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