Merge branch '1968-monitor-disk-usage'
[arvados.git] / services / api / db / schema.rb
1 # encoding: UTF-8
2 # This file is auto-generated from the current state of the database. Instead
3 # of editing this file, please use the migrations feature of Active Record to
4 # incrementally modify your database, and then regenerate this schema definition.
5 #
6 # Note that this schema.rb definition is the authoritative source for your
7 # database schema. If you need to create the application database on another
8 # system, you should be using db:schema:load, not running all the migrations
9 # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10 # you'll amass, the slower it'll run and the greater likelihood for issues).
11 #
12 # It's strongly recommended to check this file into your version control system.
13
14 ActiveRecord::Schema.define(:version => 20140501165548) do
15
16
17
18   create_table "api_client_authorizations", :force => true do |t|
19     t.string   "api_token",                                           :null => false
20     t.integer  "api_client_id",                                       :null => false
21     t.integer  "user_id",                                             :null => false
22     t.string   "created_by_ip_address"
23     t.string   "last_used_by_ip_address"
24     t.datetime "last_used_at"
25     t.datetime "expires_at"
26     t.datetime "created_at",                                          :null => false
27     t.datetime "updated_at",                                          :null => false
28     t.string   "default_owner_uuid"
29     t.text     "scopes",                  :default => "---\n- all\n", :null => false
30   end
31
32   add_index "api_client_authorizations", ["api_client_id"], :name => "index_api_client_authorizations_on_api_client_id"
33   add_index "api_client_authorizations", ["api_token"], :name => "index_api_client_authorizations_on_api_token", :unique => true
34   add_index "api_client_authorizations", ["expires_at"], :name => "index_api_client_authorizations_on_expires_at"
35   add_index "api_client_authorizations", ["user_id"], :name => "index_api_client_authorizations_on_user_id"
36
37   create_table "api_clients", :force => true do |t|
38     t.string   "uuid"
39     t.string   "owner_uuid"
40     t.string   "modified_by_client_uuid"
41     t.string   "modified_by_user_uuid"
42     t.datetime "modified_at"
43     t.string   "name"
44     t.string   "url_prefix"
45     t.datetime "created_at",                                 :null => false
46     t.datetime "updated_at",                                 :null => false
47     t.boolean  "is_trusted",              :default => false
48   end
49
50   add_index "api_clients", ["created_at"], :name => "index_api_clients_on_created_at"
51   add_index "api_clients", ["modified_at"], :name => "index_api_clients_on_modified_at"
52   add_index "api_clients", ["uuid"], :name => "index_api_clients_on_uuid", :unique => true
53
54   create_table "authorized_keys", :force => true do |t|
55     t.string   "uuid",                    :null => false
56     t.string   "owner_uuid",              :null => false
57     t.string   "modified_by_client_uuid"
58     t.string   "modified_by_user_uuid"
59     t.datetime "modified_at"
60     t.string   "name"
61     t.string   "key_type"
62     t.string   "authorized_user_uuid"
63     t.text     "public_key"
64     t.datetime "expires_at"
65     t.datetime "created_at",              :null => false
66     t.datetime "updated_at",              :null => false
67   end
68
69   add_index "authorized_keys", ["authorized_user_uuid", "expires_at"], :name => "index_authkeys_on_user_and_expires_at"
70   add_index "authorized_keys", ["uuid"], :name => "index_authorized_keys_on_uuid", :unique => true
71
72   create_table "collections", :force => true do |t|
73     t.string   "locator"
74     t.string   "owner_uuid"
75     t.datetime "created_at",                          :null => false
76     t.string   "modified_by_client_uuid"
77     t.string   "modified_by_user_uuid"
78     t.datetime "modified_at"
79     t.string   "portable_data_hash"
80     t.string   "name"
81     t.integer  "redundancy"
82     t.string   "redundancy_confirmed_by_client_uuid"
83     t.datetime "redundancy_confirmed_at"
84     t.integer  "redundancy_confirmed_as"
85     t.datetime "updated_at",                          :null => false
86     t.string   "uuid"
87     t.text     "manifest_text"
88   end
89
90   add_index "collections", ["created_at"], :name => "index_collections_on_created_at"
91   add_index "collections", ["modified_at"], :name => "index_collections_on_modified_at"
92   add_index "collections", ["uuid"], :name => "index_collections_on_uuid", :unique => true
93
94   create_table "commit_ancestors", :force => true do |t|
95     t.string   "repository_name"
96     t.string   "descendant",                         :null => false
97     t.string   "ancestor",                           :null => false
98     t.boolean  "is",              :default => false, :null => false
99     t.datetime "created_at",                         :null => false
100     t.datetime "updated_at",                         :null => false
101   end
102
103   add_index "commit_ancestors", ["descendant", "ancestor"], :name => "index_commit_ancestors_on_descendant_and_ancestor", :unique => true
104
105   create_table "commits", :force => true do |t|
106     t.string   "repository_name"
107     t.string   "sha1"
108     t.string   "message"
109     t.datetime "created_at",      :null => false
110     t.datetime "updated_at",      :null => false
111   end
112
113   add_index "commits", ["repository_name", "sha1"], :name => "index_commits_on_repository_name_and_sha1", :unique => true
114
115   create_table "groups", :force => true do |t|
116     t.string   "uuid"
117     t.string   "owner_uuid"
118     t.datetime "created_at",              :null => false
119     t.string   "modified_by_client_uuid"
120     t.string   "modified_by_user_uuid"
121     t.datetime "modified_at"
122     t.string   "name"
123     t.text     "description"
124     t.datetime "updated_at",              :null => false
125     t.string   "group_class"
126   end
127
128   add_index "groups", ["created_at"], :name => "index_groups_on_created_at"
129   add_index "groups", ["group_class"], :name => "index_groups_on_group_class"
130   add_index "groups", ["modified_at"], :name => "index_groups_on_modified_at"
131   add_index "groups", ["uuid"], :name => "index_groups_on_uuid", :unique => true
132
133   create_table "humans", :force => true do |t|
134     t.string   "uuid",                    :null => false
135     t.string   "owner_uuid",              :null => false
136     t.string   "modified_by_client_uuid"
137     t.string   "modified_by_user_uuid"
138     t.datetime "modified_at"
139     t.text     "properties"
140     t.datetime "created_at",              :null => false
141     t.datetime "updated_at",              :null => false
142   end
143
144   add_index "humans", ["uuid"], :name => "index_humans_on_uuid", :unique => true
145
146   create_table "job_tasks", :force => true do |t|
147     t.string   "uuid"
148     t.string   "owner_uuid"
149     t.string   "modified_by_client_uuid"
150     t.string   "modified_by_user_uuid"
151     t.datetime "modified_at"
152     t.string   "job_uuid"
153     t.integer  "sequence"
154     t.text     "parameters"
155     t.text     "output"
156     t.float    "progress"
157     t.boolean  "success"
158     t.datetime "created_at",                            :null => false
159     t.datetime "updated_at",                            :null => false
160     t.string   "created_by_job_task_uuid"
161     t.integer  "qsequence",                :limit => 8
162   end
163
164   add_index "job_tasks", ["created_at"], :name => "index_job_tasks_on_created_at"
165   add_index "job_tasks", ["job_uuid"], :name => "index_job_tasks_on_job_uuid"
166   add_index "job_tasks", ["modified_at"], :name => "index_job_tasks_on_modified_at"
167   add_index "job_tasks", ["sequence"], :name => "index_job_tasks_on_sequence"
168   add_index "job_tasks", ["success"], :name => "index_job_tasks_on_success"
169   add_index "job_tasks", ["uuid"], :name => "index_job_tasks_on_uuid", :unique => true
170
171   create_table "jobs", :force => true do |t|
172     t.string   "uuid"
173     t.string   "owner_uuid"
174     t.string   "modified_by_client_uuid"
175     t.string   "modified_by_user_uuid"
176     t.datetime "modified_at"
177     t.string   "submit_id"
178     t.string   "script"
179     t.string   "script_version"
180     t.text     "script_parameters"
181     t.string   "cancelled_by_client_uuid"
182     t.string   "cancelled_by_user_uuid"
183     t.datetime "cancelled_at"
184     t.datetime "started_at"
185     t.datetime "finished_at"
186     t.boolean  "running"
187     t.boolean  "success"
188     t.string   "output"
189     t.datetime "created_at",                                  :null => false
190     t.datetime "updated_at",                                  :null => false
191     t.string   "priority"
192     t.string   "is_locked_by_uuid"
193     t.string   "log"
194     t.text     "tasks_summary"
195     t.text     "runtime_constraints"
196     t.boolean  "nondeterministic"
197     t.string   "repository"
198     t.boolean  "output_is_persistent",     :default => false, :null => false
199   end
200
201   add_index "jobs", ["created_at"], :name => "index_jobs_on_created_at"
202   add_index "jobs", ["finished_at"], :name => "index_jobs_on_finished_at"
203   add_index "jobs", ["modified_at"], :name => "index_jobs_on_modified_at"
204   add_index "jobs", ["output"], :name => "index_jobs_on_output"
205   add_index "jobs", ["script"], :name => "index_jobs_on_script"
206   add_index "jobs", ["started_at"], :name => "index_jobs_on_started_at"
207   add_index "jobs", ["submit_id"], :name => "index_jobs_on_submit_id", :unique => true
208   add_index "jobs", ["uuid"], :name => "index_jobs_on_uuid", :unique => true
209
210   create_table "keep_disks", :force => true do |t|
211     t.string   "uuid",                                      :null => false
212     t.string   "owner_uuid",                                :null => false
213     t.string   "modified_by_client_uuid"
214     t.string   "modified_by_user_uuid"
215     t.datetime "modified_at"
216     t.string   "ping_secret",                               :null => false
217     t.string   "node_uuid"
218     t.string   "filesystem_uuid"
219     t.integer  "bytes_total"
220     t.integer  "bytes_free"
221     t.boolean  "is_readable",             :default => true, :null => false
222     t.boolean  "is_writable",             :default => true, :null => false
223     t.datetime "last_read_at"
224     t.datetime "last_write_at"
225     t.datetime "last_ping_at"
226     t.datetime "created_at",                                :null => false
227     t.datetime "updated_at",                                :null => false
228     t.string   "service_host"
229     t.integer  "service_port"
230     t.boolean  "service_ssl_flag"
231   end
232
233   add_index "keep_disks", ["filesystem_uuid"], :name => "index_keep_disks_on_filesystem_uuid"
234   add_index "keep_disks", ["last_ping_at"], :name => "index_keep_disks_on_last_ping_at"
235   add_index "keep_disks", ["node_uuid"], :name => "index_keep_disks_on_node_uuid"
236   add_index "keep_disks", ["service_host", "service_port", "last_ping_at"], :name => "keep_disks_service_host_port_ping_at_index"
237   add_index "keep_disks", ["uuid"], :name => "index_keep_disks_on_uuid", :unique => true
238
239   create_table "links", :force => true do |t|
240     t.string   "uuid"
241     t.string   "owner_uuid"
242     t.datetime "created_at",              :null => false
243     t.string   "modified_by_client_uuid"
244     t.string   "modified_by_user_uuid"
245     t.datetime "modified_at"
246     t.string   "tail_uuid"
247     t.string   "link_class"
248     t.string   "name"
249     t.string   "head_uuid"
250     t.text     "properties"
251     t.datetime "updated_at",              :null => false
252   end
253
254   add_index "links", ["created_at"], :name => "index_links_on_created_at"
255   add_index "links", ["head_uuid"], :name => "index_links_on_head_uuid"
256   add_index "links", ["modified_at"], :name => "index_links_on_modified_at"
257   add_index "links", ["tail_uuid", "name"], :name => "links_tail_name_unique_if_link_class_name", :unique => true, :where => "((link_class)::text = 'name'::text)"
258   add_index "links", ["tail_uuid"], :name => "index_links_on_tail_uuid"
259   add_index "links", ["uuid"], :name => "index_links_on_uuid", :unique => true
260
261   create_table "logs", :force => true do |t|
262     t.string   "uuid"
263     t.string   "owner_uuid"
264     t.string   "modified_by_client_uuid"
265     t.string   "modified_by_user_uuid"
266     t.string   "object_uuid"
267     t.datetime "event_at"
268     t.string   "event_type"
269     t.text     "summary"
270     t.text     "properties"
271     t.datetime "created_at",              :null => false
272     t.datetime "updated_at",              :null => false
273     t.datetime "modified_at"
274     t.string   "object_owner_uuid"
275   end
276
277   add_index "logs", ["created_at"], :name => "index_logs_on_created_at"
278   add_index "logs", ["event_at"], :name => "index_logs_on_event_at"
279   add_index "logs", ["event_type"], :name => "index_logs_on_event_type"
280   add_index "logs", ["modified_at"], :name => "index_logs_on_modified_at"
281   add_index "logs", ["object_uuid"], :name => "index_logs_on_object_uuid"
282   add_index "logs", ["summary"], :name => "index_logs_on_summary"
283   add_index "logs", ["uuid"], :name => "index_logs_on_uuid", :unique => true
284
285   create_table "nodes", :force => true do |t|
286     t.string   "uuid"
287     t.string   "owner_uuid"
288     t.datetime "created_at",              :null => false
289     t.string   "modified_by_client_uuid"
290     t.string   "modified_by_user_uuid"
291     t.datetime "modified_at"
292     t.integer  "slot_number"
293     t.string   "hostname"
294     t.string   "domain"
295     t.string   "ip_address"
296     t.datetime "first_ping_at"
297     t.datetime "last_ping_at"
298     t.text     "info"
299     t.datetime "updated_at",              :null => false
300   end
301
302   add_index "nodes", ["created_at"], :name => "index_nodes_on_created_at"
303   add_index "nodes", ["hostname"], :name => "index_nodes_on_hostname"
304   add_index "nodes", ["modified_at"], :name => "index_nodes_on_modified_at"
305   add_index "nodes", ["slot_number"], :name => "index_nodes_on_slot_number", :unique => true
306   add_index "nodes", ["uuid"], :name => "index_nodes_on_uuid", :unique => true
307
308   create_table "pipeline_instances", :force => true do |t|
309     t.string   "uuid"
310     t.string   "owner_uuid"
311     t.datetime "created_at",                                 :null => false
312     t.string   "modified_by_client_uuid"
313     t.string   "modified_by_user_uuid"
314     t.datetime "modified_at"
315     t.string   "pipeline_template_uuid"
316     t.string   "name"
317     t.text     "components"
318     t.boolean  "success"
319     t.boolean  "active",                  :default => false
320     t.datetime "updated_at",                                 :null => false
321     t.text     "properties"
322     t.string   "state"
323     t.text     "components_summary"
324   end
325
326   add_index "pipeline_instances", ["created_at"], :name => "index_pipeline_instances_on_created_at"
327   add_index "pipeline_instances", ["modified_at"], :name => "index_pipeline_instances_on_modified_at"
328   add_index "pipeline_instances", ["uuid"], :name => "index_pipeline_instances_on_uuid", :unique => true
329
330   create_table "pipeline_templates", :force => true do |t|
331     t.string   "uuid"
332     t.string   "owner_uuid"
333     t.datetime "created_at",              :null => false
334     t.string   "modified_by_client_uuid"
335     t.string   "modified_by_user_uuid"
336     t.datetime "modified_at"
337     t.string   "name"
338     t.text     "components"
339     t.datetime "updated_at",              :null => false
340   end
341
342   add_index "pipeline_templates", ["created_at"], :name => "index_pipeline_templates_on_created_at"
343   add_index "pipeline_templates", ["modified_at"], :name => "index_pipeline_templates_on_modified_at"
344   add_index "pipeline_templates", ["uuid"], :name => "index_pipeline_templates_on_uuid", :unique => true
345
346   create_table "repositories", :force => true do |t|
347     t.string   "uuid",                    :null => false
348     t.string   "owner_uuid",              :null => false
349     t.string   "modified_by_client_uuid"
350     t.string   "modified_by_user_uuid"
351     t.datetime "modified_at"
352     t.string   "name"
353     t.string   "fetch_url"
354     t.string   "push_url"
355     t.datetime "created_at",              :null => false
356     t.datetime "updated_at",              :null => false
357   end
358
359   add_index "repositories", ["name"], :name => "index_repositories_on_name", :unique => true
360   add_index "repositories", ["uuid"], :name => "index_repositories_on_uuid", :unique => true
361
362   create_table "specimens", :force => true do |t|
363     t.string   "uuid"
364     t.string   "owner_uuid"
365     t.datetime "created_at",              :null => false
366     t.string   "modified_by_client_uuid"
367     t.string   "modified_by_user_uuid"
368     t.datetime "modified_at"
369     t.string   "material"
370     t.datetime "updated_at",              :null => false
371     t.text     "properties"
372   end
373
374   add_index "specimens", ["created_at"], :name => "index_specimens_on_created_at"
375   add_index "specimens", ["modified_at"], :name => "index_specimens_on_modified_at"
376   add_index "specimens", ["uuid"], :name => "index_specimens_on_uuid", :unique => true
377
378   create_table "traits", :force => true do |t|
379     t.string   "uuid",                    :null => false
380     t.string   "owner_uuid",              :null => false
381     t.string   "modified_by_client_uuid"
382     t.string   "modified_by_user_uuid"
383     t.datetime "modified_at"
384     t.string   "name"
385     t.text     "properties"
386     t.datetime "created_at",              :null => false
387     t.datetime "updated_at",              :null => false
388   end
389
390   add_index "traits", ["name"], :name => "index_traits_on_name"
391   add_index "traits", ["uuid"], :name => "index_traits_on_uuid", :unique => true
392
393   create_table "users", :force => true do |t|
394     t.string   "uuid"
395     t.string   "owner_uuid"
396     t.datetime "created_at",                                 :null => false
397     t.string   "modified_by_client_uuid"
398     t.string   "modified_by_user_uuid"
399     t.datetime "modified_at"
400     t.string   "email"
401     t.string   "first_name"
402     t.string   "last_name"
403     t.string   "identity_url"
404     t.boolean  "is_admin"
405     t.text     "prefs"
406     t.datetime "updated_at",                                 :null => false
407     t.string   "default_owner_uuid"
408     t.boolean  "is_active",               :default => false
409   end
410
411   add_index "users", ["created_at"], :name => "index_users_on_created_at"
412   add_index "users", ["modified_at"], :name => "index_users_on_modified_at"
413   add_index "users", ["uuid"], :name => "index_users_on_uuid", :unique => true
414
415   create_table "virtual_machines", :force => true do |t|
416     t.string   "uuid",                    :null => false
417     t.string   "owner_uuid",              :null => false
418     t.string   "modified_by_client_uuid"
419     t.string   "modified_by_user_uuid"
420     t.datetime "modified_at"
421     t.string   "hostname"
422     t.datetime "created_at",              :null => false
423     t.datetime "updated_at",              :null => false
424   end
425
426   add_index "virtual_machines", ["hostname"], :name => "index_virtual_machines_on_hostname"
427   add_index "virtual_machines", ["uuid"], :name => "index_virtual_machines_on_uuid", :unique => true
428
429
430 end