socialforge/db/migrate/20141127015431_create_api_k...

15 lines
326 B
Ruby

class CreateApiKeys < ActiveRecord::Migration
def change
create_table :api_keys do |t|
t.string :access_token
t.datetime :expires_at
t.integer :user_id
t.boolean :active, default: true
t.timestamps
end
add_index :api_keys, :user_id
add_index :api_keys, :access_token
end
end