Sha256: ce18a989a13ed6140fd1948bc74b04015ec7d8f13f984116fcf31a04d047320b

Contents?: true

Size: 599 Bytes

Versions: 17

Compression:

Stored size: 599 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
    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

17 entries across 17 versions & 1 rubygems

Version Path
challah-1.2.5.pre db/migrate/20121116210759_create_authorizations.rb
challah-1.2.4 db/migrate/20121116210759_create_authorizations.rb
challah-1.2.3 db/migrate/20121116210759_create_authorizations.rb
challah-1.2.2 db/migrate/20121116210759_create_authorizations.rb
challah-1.2.1 db/migrate/20121116210759_create_authorizations.rb
challah-1.2.0 db/migrate/20121116210759_create_authorizations.rb
challah-1.2.0.rc db/migrate/20121116210759_create_authorizations.rb
challah-1.1.1 db/migrate/20121116210759_create_authorizations.rb
challah-1.1.0 db/migrate/20121116210759_create_authorizations.rb
challah-1.0.0 db/migrate/20121116210759_create_authorizations.rb
challah-1.0.0.beta3 db/migrate/20121116210759_create_authorizations.rb
challah-1.0.0.beta2 db/migrate/20121116210759_create_authorizations.rb
challah-1.0.0.beta db/migrate/20121116210759_create_authorizations.rb
challah-0.9.1.beta.3 db/migrate/20121116210759_create_authorizations.rb
challah-0.9.1.beta.2 db/migrate/20121116210759_create_authorizations.rb
challah-0.9.1.beta db/migrate/20121116210759_create_authorizations.rb
challah-0.9.0 db/migrate/20121116210759_create_authorizations.rb