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