Class: CreateOauthProviderEngineTables
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateOauthProviderEngineTables
- Defined in:
- lib/generators/oauth_provider_engine/templates/migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
27 28 29 30 31 |
# File 'lib/generators/oauth_provider_engine/templates/migration.rb', line 27 def self.down drop_table :request_tokens drop_table :access_tokens drop_table :applications end |
.up ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/generators/oauth_provider_engine/templates/migration.rb', line 3 def self.up create_table :applications do |t| t.string :name t.string :url t.string :key t.string :secret end create_table :access_tokens do |t| t.integer :application_id t.string :token t.string :secret t.integer :user_id t.datetime :expires_at end create_table :request_tokens do |t| t.integer :application_id t.string :token t.string :secret t.integer :user_id end end |