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