2659: split server side implementation into a separate branch to facilitate better...
[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 => 20140627210837) 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.integer  "redundancy"
81     t.string   "redundancy_confirmed_by_client_uuid"
82     t.datetime "redundancy_confirmed_at"
83     t.integer  "redundancy_confirmed_as"
84     t.datetime "updated_at",                          :null => false
85     t.string   "uuid"
86     t.text     "manifest_text"
87   end
88
89   add_index "collections", ["created_at"], :name => "index_collections_on_created_at"
90   add_index "collections", ["modified_at"], :name => "index_collections_on_modified_at"
91   add_index "collections", ["uuid"], :name => "index_collections_on_uuid", :unique => true
92
93   create_table "commit_ancestors", :force => true do |t|
94     t.string   "repository_name"
95     t.string   "descendant",                         :null => false
96     t.string   "ancestor",                           :null => false
97     t.boolean  "is",              :default => false, :null => false
98     t.datetime "created_at",                         :null => false
99     t.datetime "updated_at",                         :null => false
100   end
101
102   add_index "commit_ancestors", ["descendant", "ancestor"], :name => "index_commit_ancestors_on_descendant_and_ancestor", :unique => true
103
104   create_table "commits", :force => true do |t|
105     t.string   "repository_name"
106     t.string   "sha1"
107     t.string   "message"
108     t.datetime "created_at",      :null => false
109     t.datetime "updated_at",      :null => false
110   end
111
112   add_index "commits", ["repository_name", "sha1"], :name => "index_commits_on_repository_name_and_sha1", :unique => true
113
114   create_table "groups", :force => true do |t|
115     t.string   "uuid"
116     t.string   "owner_uuid"
117     t.datetime "created_at",              :null => false
118     t.string   "modified_by_client_uuid"
119     t.string   "modified_by_user_uuid"
120     t.datetime "modified_at"
121     t.string   "name"
122     t.text     "description"
123     t.datetime "updated_at",              :null => false
124     t.string   "group_class"
125   end
126
127   add_index "groups", ["created_at"], :name => "index_groups_on_created_at"
128   add_index "groups", ["group_class"], :name => "index_groups_on_group_class"
129   add_index "groups", ["modified_at"], :name => "index_groups_on_modified_at"
130   add_index "groups", ["uuid"], :name => "index_groups_on_uuid", :unique => true
131
132   create_table "humans", :force => true do |t|
133     t.string   "uuid",                    :null => false
134     t.string   "owner_uuid",              :null => false
135     t.string   "modified_by_client_uuid"
136     t.string   "modified_by_user_uuid"
137     t.datetime "modified_at"
138     t.text     "properties"
139     t.datetime "created_at",              :null => false
140     t.datetime "updated_at",              :null => false
141   end
142
143   add_index "humans", ["uuid"], :name => "index_humans_on_uuid", :unique => true
144
145   create_table "job_tasks", :force => true do |t|
146     t.string   "uuid"
147     t.string   "owner_uuid"
148     t.string   "modified_by_client_uuid"
149     t.string   "modified_by_user_uuid"
150     t.datetime "modified_at"
151     t.string   "job_uuid"
152     t.integer  "sequence"
153     t.text     "parameters"
154     t.text     "output"
155     t.float    "progress"
156     t.boolean  "success"
157     t.datetime "created_at",                            :null => false
158     t.datetime "updated_at",                            :null => false
159     t.string   "created_by_job_task_uuid"
160     t.integer  "qsequence",                :limit => 8
161   end
162
163   add_index "job_tasks", ["created_at"], :name => "index_job_tasks_on_created_at"
164   add_index "job_tasks", ["job_uuid"], :name => "index_job_tasks_on_job_uuid"
165   add_index "job_tasks", ["modified_at"], :name => "index_job_tasks_on_modified_at"
166   add_index "job_tasks", ["sequence"], :name => "index_job_tasks_on_sequence"
167   add_index "job_tasks", ["success"], :name => "index_job_tasks_on_success"
168   add_index "job_tasks", ["uuid"], :name => "index_job_tasks_on_uuid", :unique => true
169
170   create_table "jobs", :force => true do |t|
171     t.string   "uuid"
172     t.string   "owner_uuid"
173     t.string   "modified_by_client_uuid"
174     t.string   "modified_by_user_uuid"
175     t.datetime "modified_at"
176     t.string   "submit_id"
177     t.string   "script"
178     t.string   "script_version"
179     t.text     "script_parameters"
180     t.string   "cancelled_by_client_uuid"
181     t.string   "cancelled_by_user_uuid"
182     t.datetime "cancelled_at"
183     t.datetime "started_at"
184     t.datetime "finished_at"
185     t.boolean  "running"
186     t.boolean  "success"
187     t.string   "output"
188     t.datetime "created_at",                                  :null => false
189     t.datetime "updated_at",                                  :null => false
190     t.string   "priority"
191     t.string   "is_locked_by_uuid"
192     t.string   "log"
193     t.text     "tasks_summary"
194     t.text     "runtime_constraints"
195     t.boolean  "nondeterministic"
196     t.string   "repository"
197     t.boolean  "output_is_persistent",     :default => false, :null => false
198     t.string   "supplied_script_version"
199     t.string   "docker_image_locator"
200   end
201
202   add_index "jobs", ["created_at"], :name => "index_jobs_on_created_at"
203   add_index "jobs", ["finished_at"], :name => "index_jobs_on_finished_at"
204   add_index "jobs", ["modified_at"], :name => "index_jobs_on_modified_at"
205   add_index "jobs", ["output"], :name => "index_jobs_on_output"
206   add_index "jobs", ["script"], :name => "index_jobs_on_script"
207   add_index "jobs", ["started_at"], :name => "index_jobs_on_started_at"
208   add_index "jobs", ["submit_id"], :name => "index_jobs_on_submit_id", :unique => true
209   add_index "jobs", ["uuid"], :name => "index_jobs_on_uuid", :unique => true
210
211   create_table "keep_disks", :force => true do |t|
212     t.string   "uuid",                                      :null => false
213     t.string   "owner_uuid",                                :null => false
214     t.string   "modified_by_client_uuid"
215     t.string   "modified_by_user_uuid"
216     t.datetime "modified_at"
217     t.string   "ping_secret",                               :null => false
218     t.string   "node_uuid"
219     t.string   "filesystem_uuid"
220     t.integer  "bytes_total"
221     t.integer  "bytes_free"
222     t.boolean  "is_readable",             :default => true, :null => false
223     t.boolean  "is_writable",             :default => true, :null => false
224     t.datetime "last_read_at"
225     t.datetime "last_write_at"
226     t.datetime "last_ping_at"
227     t.datetime "created_at",                                :null => false
228     t.datetime "updated_at",                                :null => false
229     t.string   "keep_service_uuid"
230   end
231
232   add_index "keep_disks", ["filesystem_uuid"], :name => "index_keep_disks_on_filesystem_uuid"
233   add_index "keep_disks", ["last_ping_at"], :name => "index_keep_disks_on_last_ping_at"
234   add_index "keep_disks", ["node_uuid"], :name => "index_keep_disks_on_node_uuid"
235   add_index "keep_disks", ["uuid"], :name => "index_keep_disks_on_uuid", :unique => true
236
237   create_table "keep_services", :force => true do |t|
238     t.string   "uuid",                    :null => false
239     t.string   "owner_uuid",              :null => false
240     t.string   "modified_by_client_uuid"
241     t.string   "modified_by_user_uuid"
242     t.datetime "modified_at"
243     t.string   "service_host"
244     t.integer  "service_port"
245     t.boolean  "service_ssl_flag"
246     t.string   "service_type"
247     t.datetime "created_at",              :null => false
248     t.datetime "updated_at",              :null => false
249   end
250
251   add_index "keep_services", ["uuid"], :name => "index_keep_services_on_uuid", :unique => true
252
253   create_table "links", :force => true do |t|
254     t.string   "uuid"
255     t.string   "owner_uuid"
256     t.datetime "created_at",              :null => false
257     t.string   "modified_by_client_uuid"
258     t.string   "modified_by_user_uuid"
259     t.datetime "modified_at"
260     t.string   "tail_uuid"
261     t.string   "link_class"
262     t.string   "name"
263     t.string   "head_uuid"
264     t.text     "properties"
265     t.datetime "updated_at",              :null => false
266   end
267
268   add_index "links", ["created_at"], :name => "index_links_on_created_at"
269   add_index "links", ["head_uuid"], :name => "index_links_on_head_uuid"
270   add_index "links", ["modified_at"], :name => "index_links_on_modified_at"
271   add_index "links", ["tail_uuid", "name"], :name => "links_tail_name_unique_if_link_class_name", :unique => true, :where => "((link_class)::text = 'name'::text)"
272   add_index "links", ["tail_uuid"], :name => "index_links_on_tail_uuid"
273   add_index "links", ["uuid"], :name => "index_links_on_uuid", :unique => true
274
275   create_table "logs", :force => true do |t|
276     t.string   "uuid"
277     t.string   "owner_uuid"
278     t.string   "modified_by_client_uuid"
279     t.string   "modified_by_user_uuid"
280     t.string   "object_uuid"
281     t.datetime "event_at"
282     t.string   "event_type"
283     t.text     "summary"
284     t.text     "properties"
285     t.datetime "created_at",              :null => false
286     t.datetime "updated_at",              :null => false
287     t.datetime "modified_at"
288     t.string   "object_owner_uuid"
289   end
290
291   add_index "logs", ["created_at"], :name => "index_logs_on_created_at"
292   add_index "logs", ["event_at"], :name => "index_logs_on_event_at"
293   add_index "logs", ["event_type"], :name => "index_logs_on_event_type"
294   add_index "logs", ["modified_at"], :name => "index_logs_on_modified_at"
295   add_index "logs", ["object_uuid"], :name => "index_logs_on_object_uuid"
296   add_index "logs", ["summary"], :name => "index_logs_on_summary"
297   add_index "logs", ["uuid"], :name => "index_logs_on_uuid", :unique => true
298
299   create_table "nodes", :force => true do |t|
300     t.string   "uuid"
301     t.string   "owner_uuid"
302     t.datetime "created_at",              :null => false
303     t.string   "modified_by_client_uuid"
304     t.string   "modified_by_user_uuid"
305     t.datetime "modified_at"
306     t.integer  "slot_number"
307     t.string   "hostname"
308     t.string   "domain"
309     t.string   "ip_address"
310     t.datetime "first_ping_at"
311     t.datetime "last_ping_at"
312     t.text     "info"
313     t.datetime "updated_at",              :null => false
314   end
315
316   add_index "nodes", ["created_at"], :name => "index_nodes_on_created_at"
317   add_index "nodes", ["hostname"], :name => "index_nodes_on_hostname"
318   add_index "nodes", ["modified_at"], :name => "index_nodes_on_modified_at"
319   add_index "nodes", ["slot_number"], :name => "index_nodes_on_slot_number", :unique => true
320   add_index "nodes", ["uuid"], :name => "index_nodes_on_uuid", :unique => true
321
322   create_table "pipeline_instances", :force => true do |t|
323     t.string   "uuid"
324     t.string   "owner_uuid"
325     t.datetime "created_at",              :null => false
326     t.string   "modified_by_client_uuid"
327     t.string   "modified_by_user_uuid"
328     t.datetime "modified_at"
329     t.string   "pipeline_template_uuid"
330     t.string   "name"
331     t.text     "components"
332     t.datetime "updated_at",              :null => false
333     t.text     "properties"
334     t.string   "state"
335     t.text     "components_summary"
336   end
337
338   add_index "pipeline_instances", ["created_at"], :name => "index_pipeline_instances_on_created_at"
339   add_index "pipeline_instances", ["modified_at"], :name => "index_pipeline_instances_on_modified_at"
340   add_index "pipeline_instances", ["uuid"], :name => "index_pipeline_instances_on_uuid", :unique => true
341
342   create_table "pipeline_templates", :force => true do |t|
343     t.string   "uuid"
344     t.string   "owner_uuid"
345     t.datetime "created_at",              :null => false
346     t.string   "modified_by_client_uuid"
347     t.string   "modified_by_user_uuid"
348     t.datetime "modified_at"
349     t.string   "name"
350     t.text     "components"
351     t.datetime "updated_at",              :null => false
352     t.text     "description"
353   end
354
355   add_index "pipeline_templates", ["created_at"], :name => "index_pipeline_templates_on_created_at"
356   add_index "pipeline_templates", ["modified_at"], :name => "index_pipeline_templates_on_modified_at"
357   add_index "pipeline_templates", ["uuid"], :name => "index_pipeline_templates_on_uuid", :unique => true
358
359   create_table "repositories", :force => true do |t|
360     t.string   "uuid",                    :null => false
361     t.string   "owner_uuid",              :null => false
362     t.string   "modified_by_client_uuid"
363     t.string   "modified_by_user_uuid"
364     t.datetime "modified_at"
365     t.string   "name"
366     t.string   "fetch_url"
367     t.string   "push_url"
368     t.datetime "created_at",              :null => false
369     t.datetime "updated_at",              :null => false
370   end
371
372   add_index "repositories", ["name"], :name => "index_repositories_on_name", :unique => true
373   add_index "repositories", ["uuid"], :name => "index_repositories_on_uuid", :unique => true
374
375   create_table "specimens", :force => true do |t|
376     t.string   "uuid"
377     t.string   "owner_uuid"
378     t.datetime "created_at",              :null => false
379     t.string   "modified_by_client_uuid"
380     t.string   "modified_by_user_uuid"
381     t.datetime "modified_at"
382     t.string   "material"
383     t.datetime "updated_at",              :null => false
384     t.text     "properties"
385   end
386
387   add_index "specimens", ["created_at"], :name => "index_specimens_on_created_at"
388   add_index "specimens", ["modified_at"], :name => "index_specimens_on_modified_at"
389   add_index "specimens", ["uuid"], :name => "index_specimens_on_uuid", :unique => true
390
391   create_table "traits", :force => true do |t|
392     t.string   "uuid",                    :null => false
393     t.string   "owner_uuid",              :null => false
394     t.string   "modified_by_client_uuid"
395     t.string   "modified_by_user_uuid"
396     t.datetime "modified_at"
397     t.string   "name"
398     t.text     "properties"
399     t.datetime "created_at",              :null => false
400     t.datetime "updated_at",              :null => false
401   end
402
403   add_index "traits", ["name"], :name => "index_traits_on_name"
404   add_index "traits", ["uuid"], :name => "index_traits_on_uuid", :unique => true
405
406   create_table "users", :force => true do |t|
407     t.string   "uuid"
408     t.string   "owner_uuid"
409     t.datetime "created_at",                                 :null => false
410     t.string   "modified_by_client_uuid"
411     t.string   "modified_by_user_uuid"
412     t.datetime "modified_at"
413     t.string   "email"
414     t.string   "first_name"
415     t.string   "last_name"
416     t.string   "identity_url"
417     t.boolean  "is_admin"
418     t.text     "prefs"
419     t.datetime "updated_at",                                 :null => false
420     t.string   "default_owner_uuid"
421     t.boolean  "is_active",               :default => false
422   end
423
424   add_index "users", ["created_at"], :name => "index_users_on_created_at"
425   add_index "users", ["modified_at"], :name => "index_users_on_modified_at"
426   add_index "users", ["uuid"], :name => "index_users_on_uuid", :unique => true
427
428   create_table "virtual_machines", :force => true do |t|
429     t.string   "uuid",                    :null => false
430     t.string   "owner_uuid",              :null => false
431     t.string   "modified_by_client_uuid"
432     t.string   "modified_by_user_uuid"
433     t.datetime "modified_at"
434     t.string   "hostname"
435     t.datetime "created_at",              :null => false
436     t.datetime "updated_at",              :null => false
437   end
438
439   add_index "virtual_machines", ["hostname"], :name => "index_virtual_machines_on_hostname"
440   add_index "virtual_machines", ["uuid"], :name => "index_virtual_machines_on_uuid", :unique => true
441
442
443 end