Class: CreateOauthConsumerTokens
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateOauthConsumerTokens
- Defined in:
- lib/generators/active_record/oauth_consumer_templates/migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
16 17 18 |
# File 'lib/generators/active_record/oauth_consumer_templates/migration.rb', line 16 def self.down drop_table :consumer_tokens end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/active_record/oauth_consumer_templates/migration.rb', line 2 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 :secret t. end add_index :consumer_tokens, :token, :unique => true, :length => 100 end |