Merge branch '8784-dir-listings'
[arvados.git] / services / api / db / migrate / 20130122201442_create_logs.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class CreateLogs < ActiveRecord::Migration
6   def up
7     create_table :logs do |t|
8       t.string :uuid
9       t.string :created_by_client
10       t.string :created_by_user
11       t.string :modified_by_client
12       t.string :modified_by_user
13       t.string :object_kind
14       t.string :object_uuid
15       t.datetime :event_at
16       t.string :event_type
17       t.text :summary
18       t.text :info
19
20       t.timestamps
21     end
22     add_index :logs, :uuid, :unique => true
23     add_index :logs, :object_kind
24     add_index :logs, :object_uuid
25     add_index :logs, :event_type
26     add_index :logs, :event_at
27     add_index :logs, :summary
28   end
29
30   def down
31     drop_table :logs  end
32 end