Merge branch '8784-dir-listings'
[arvados.git] / services / api / db / migrate / 20130606183519_create_authorized_keys.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class CreateAuthorizedKeys < ActiveRecord::Migration
6   def change
7     create_table :authorized_keys do |t|
8       t.string :uuid, :null => false
9       t.string :owner, :null => false
10       t.string :modified_by_client
11       t.string :modified_by_user
12       t.datetime :modified_at
13       t.string :name
14       t.string :key_type
15       t.string :authorized_user
16       t.text :public_key
17       t.datetime :expires_at
18
19       t.timestamps
20     end
21     add_index :authorized_keys, :uuid, :unique => true
22     add_index :authorized_keys, [:authorized_user, :expires_at]
23   end
24 end