Sha256: ea579ad4a30f317987ff2569bf99f2ee0c3da96c9bbc0705c5ddb3fce806d17d

Contents?: true

Size: 552 Bytes

Versions: 7

Compression:

Stored size: 552 Bytes

Contents

class CreateOauthConsumerTokens < ActiveRecord::Migration
  def self.up

    create_table :consumer_tokens do |t|
      t.integer :user_id
      t.string :type, :limit => 30
      t.string :token, :limit => 1024 # This has to be huge because of Yahoo's excessively large tokens
      t.string :refresh_token
      t.string :expires_in
      t.string :expires_at
      t.string :secret
      t.timestamps
    end

    add_index :consumer_tokens, :token, :unique => true, :length => 100

  end

  def self.down
    drop_table :consumer_tokens
  end

end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
houston-oauth-plugin-0.5.1 generators/oauth_consumer/templates/migration.rb
oauth_consumer-0.1.3 generators/oauth_consumer/templates/migration.rb
oauth_consumer-0.1.2 generators/oauth_consumer/templates/migration.rb
oauth_consumer-0.1.1 generators/oauth_consumer/templates/migration.rb
oauth_consumer-0.1.0 generators/oauth_consumer/templates/migration.rb
oauth-plugin-0.5.1 generators/oauth_consumer/templates/migration.rb
oauth-plugin-0.5.0 generators/oauth_consumer/templates/migration.rb