Sha256: d556169e2278ba7dcb12f5f2bc4ebc4002fed08f5baa5c7a0209faf0eac79ed7

Contents?: true

Size: 584 Bytes

Versions: 1

Compression:

Stored size: 584 Bytes

Contents

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
authtrail-0.1.1 lib/generators/authtrail/templates/login_activities_migration.rb