Sha256: bec35f7dc00a79f22e0e95b65db422363c5db0ccfe37def9443693a922983c79

Contents?: true

Size: 612 Bytes

Versions: 7

Compression:

Stored size: 612 Bytes

Contents

class CreateAuthorizations < ActiveRecord::Migration
  def change
    create_table :authorizations do |t|
      t.integer     :user_id
      t.string      :provider, limit: 50
      t.string      :uid
      t.string      :token, limit: 500
      t.datetime    :expires_at
      t.datetime    :last_session_at
      t.string      :last_session_ip
      t.integer     :session_count, default: 0
      t.timestamps  null: true
    end

    add_index :authorizations, :user_id
    add_index :authorizations, [ :user_id, :provider ]
    add_index :authorizations, :uid
    add_index :authorizations, :token
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
challah-1.2.11 db/migrate/20121116210759_create_authorizations.rb
challah-1.2.10 db/migrate/20121116210759_create_authorizations.rb
challah-1.2.9 db/migrate/20121116210759_create_authorizations.rb
challah-1.2.8 db/migrate/20121116210759_create_authorizations.rb
challah-1.2.7 db/migrate/20121116210759_create_authorizations.rb
challah-1.2.6 db/migrate/20121116210759_create_authorizations.rb
challah-1.2.5 db/migrate/20121116210759_create_authorizations.rb