1 class CreateOauthTables < ActiveRecord::Migration
3 create_table :client_applications do |t|
8 t.string :key, :limit => 50
9 t.string :secret, :limit => 50
14 add_index :client_applications, :key, :unique => true
16 create_table :oauth_tokens do |t|
18 t.string :type, :limit => 20
19 t.integer :client_application_id
20 t.string :token, :limit => 50
21 t.string :secret, :limit => 50
22 t.timestamp :authorized_at, :invalidated_at
26 add_index :oauth_tokens, :token, :unique => true
28 create_table :oauth_nonces do |t|
34 add_index :oauth_nonces, [:nonce, :timestamp], :unique => true
38 drop_table :client_applications
39 drop_table :oauth_tokens
40 drop_table :oauth_nonces