8784: Fix test for latest firefox.
[arvados.git] / services / api / db / migrate / 20130123180228_create_api_client_authorizations.rb
1 class CreateApiClientAuthorizations < ActiveRecord::Migration
2   def change
3     create_table :api_client_authorizations do |t|
4       t.string :api_token, :null => false
5       t.references :api_client, :null => false
6       t.references :user, :null => false
7       t.string :created_by_ip_address
8       t.string :last_used_by_ip_address
9       t.datetime :last_used_at
10       t.datetime :expires_at
11
12       t.timestamps
13     end
14     add_index :api_client_authorizations, :api_token, :unique => true
15     add_index :api_client_authorizations, :api_client_id
16     add_index :api_client_authorizations, :user_id
17     add_index :api_client_authorizations, :expires_at
18   end
19 end