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