Sha256: e15d3b1400982c840b29d347cd1a57f0816830f390224df2f1506f258696a78f

Contents?: true

Size: 598 Bytes

Versions: 2

Compression:

Stored size: 598 Bytes

Contents

class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version %>
  def change
    create_table :login_activities do |t|
      t.string :scope
      t.string :strategy
      t.string :identity
      t.boolean :success
      t.string :failure_reason
      t.references :user, polymorphic: true
      t.string :context
      t.string :ip
      t.text :user_agent
      t.text :referrer
      t.string :city
      t.string :region
      t.string :country
      t.datetime :created_at
    end

    add_index :login_activities, :identity
    add_index :login_activities, :ip
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
authtrail-0.1.3 lib/generators/authtrail/templates/login_activities_migration.rb.tt
authtrail-0.1.2 lib/generators/authtrail/templates/login_activities_migration.rb