Merge branch '8784-dir-listings'
[arvados.git] / services / api / db / migrate / 20151202151426_create_containers_and_requests.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class CreateContainersAndRequests < ActiveRecord::Migration
6   def change
7     create_table :containers do |t|
8       t.string :uuid
9       t.string :owner_uuid
10       t.datetime :created_at
11       t.datetime :modified_at
12       t.string :modified_by_client_uuid
13       t.string :modified_by_user_uuid
14       t.string :state
15       t.datetime :started_at
16       t.datetime :finished_at
17       t.string :log
18       t.text :environment
19       t.string :cwd
20       t.text :command
21       t.string :output_path
22       t.text :mounts
23       t.text :runtime_constraints
24       t.string :output
25       t.string :container_image
26       t.float :progress
27       t.integer :priority
28
29       t.timestamps
30     end
31
32     create_table :container_requests do |t|
33       t.string :uuid
34       t.string :owner_uuid
35       t.datetime :created_at
36       t.datetime :modified_at
37       t.string :modified_by_client_uuid
38       t.string :modified_by_user_uuid
39       t.string :name
40       t.text :description
41       t.text :properties
42       t.string :state
43       t.string :requesting_container_uuid
44       t.string :container_uuid
45       t.integer :container_count_max
46       t.text :mounts
47       t.text :runtime_constraints
48       t.string :container_image
49       t.text :environment
50       t.string :cwd
51       t.text :command
52       t.string :output_path
53       t.integer :priority
54       t.datetime :expires_at
55       t.text :filters
56
57       t.timestamps
58     end
59
60     add_index :containers, :uuid, :unique => true
61     add_index :container_requests, :uuid, :unique => true
62   end
63 end