add user#is_active flag
[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 => 20130626002829) 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"
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"
37     t.string   "modified_by_client"
38     t.string   "modified_by_user"
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",                :null => false
54     t.string   "modified_by_client"
55     t.string   "modified_by_user"
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"
72     t.datetime "created_at"
73     t.string   "modified_by_client"
74     t.string   "modified_by_user"
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"
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"
115     t.datetime "created_at"
116     t.string   "modified_by_client"
117     t.string   "modified_by_user"
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 "job_tasks", :force => true do |t|
129     t.string   "uuid"
130     t.string   "owner"
131     t.string   "modified_by_client"
132     t.string   "modified_by_user"
133     t.datetime "modified_at"
134     t.string   "job_uuid"
135     t.integer  "sequence"
136     t.text     "parameters"
137     t.text     "output"
138     t.float    "progress"
139     t.boolean  "success"
140     t.datetime "created_at"
141     t.datetime "updated_at"
142     t.string   "created_by_job_task"
143     t.integer  "qsequence",           :limit => 8
144   end
145
146   add_index "job_tasks", ["created_at"], :name => "index_job_tasks_on_created_at"
147   add_index "job_tasks", ["job_uuid"], :name => "index_job_tasks_on_job_uuid"
148   add_index "job_tasks", ["modified_at"], :name => "index_job_tasks_on_modified_at"
149   add_index "job_tasks", ["sequence"], :name => "index_job_tasks_on_sequence"
150   add_index "job_tasks", ["success"], :name => "index_job_tasks_on_success"
151   add_index "job_tasks", ["uuid"], :name => "index_job_tasks_on_uuid", :unique => true
152
153   create_table "jobs", :force => true do |t|
154     t.string   "uuid"
155     t.string   "owner"
156     t.string   "modified_by_client"
157     t.string   "modified_by_user"
158     t.datetime "modified_at"
159     t.string   "submit_id"
160     t.string   "script"
161     t.string   "script_version"
162     t.text     "script_parameters"
163     t.string   "cancelled_by_client"
164     t.string   "cancelled_by_user"
165     t.datetime "cancelled_at"
166     t.datetime "started_at"
167     t.datetime "finished_at"
168     t.boolean  "running"
169     t.boolean  "success"
170     t.string   "output"
171     t.datetime "created_at"
172     t.datetime "updated_at"
173     t.string   "priority"
174     t.string   "is_locked_by"
175     t.string   "log"
176     t.text     "tasks_summary"
177     t.text     "resource_limits"
178   end
179
180   add_index "jobs", ["created_at"], :name => "index_jobs_on_created_at"
181   add_index "jobs", ["finished_at"], :name => "index_jobs_on_finished_at"
182   add_index "jobs", ["modified_at"], :name => "index_jobs_on_modified_at"
183   add_index "jobs", ["output"], :name => "index_jobs_on_output"
184   add_index "jobs", ["script"], :name => "index_jobs_on_script"
185   add_index "jobs", ["started_at"], :name => "index_jobs_on_started_at"
186   add_index "jobs", ["submit_id"], :name => "index_jobs_on_submit_id", :unique => true
187   add_index "jobs", ["uuid"], :name => "index_jobs_on_uuid", :unique => true
188
189   create_table "keep_disks", :force => true do |t|
190     t.string   "uuid",                                 :null => false
191     t.string   "owner",                                :null => false
192     t.string   "modified_by_client"
193     t.string   "modified_by_user"
194     t.datetime "modified_at"
195     t.string   "ping_secret",                          :null => false
196     t.string   "node_uuid"
197     t.string   "filesystem_uuid"
198     t.integer  "bytes_total"
199     t.integer  "bytes_free"
200     t.boolean  "is_readable",        :default => true, :null => false
201     t.boolean  "is_writable",        :default => true, :null => false
202     t.datetime "last_read_at"
203     t.datetime "last_write_at"
204     t.datetime "last_ping_at"
205     t.datetime "created_at"
206     t.datetime "updated_at"
207     t.string   "service_host"
208     t.integer  "service_port"
209     t.boolean  "service_ssl_flag"
210   end
211
212   add_index "keep_disks", ["filesystem_uuid"], :name => "index_keep_disks_on_filesystem_uuid"
213   add_index "keep_disks", ["last_ping_at"], :name => "index_keep_disks_on_last_ping_at"
214   add_index "keep_disks", ["node_uuid"], :name => "index_keep_disks_on_node_uuid"
215   add_index "keep_disks", ["service_host", "service_port", "last_ping_at"], :name => "keep_disks_service_host_port_ping_at_index"
216   add_index "keep_disks", ["uuid"], :name => "index_keep_disks_on_uuid", :unique => true
217
218   create_table "links", :force => true do |t|
219     t.string   "uuid"
220     t.string   "owner"
221     t.datetime "created_at"
222     t.string   "modified_by_client"
223     t.string   "modified_by_user"
224     t.datetime "modified_at"
225     t.string   "tail_uuid"
226     t.string   "tail_kind"
227     t.string   "link_class"
228     t.string   "name"
229     t.string   "head_uuid"
230     t.text     "properties"
231     t.datetime "updated_at"
232     t.string   "head_kind"
233   end
234
235   add_index "links", ["created_at"], :name => "index_links_on_created_at"
236   add_index "links", ["head_kind"], :name => "index_links_on_head_kind"
237   add_index "links", ["head_uuid"], :name => "index_links_on_head_uuid"
238   add_index "links", ["modified_at"], :name => "index_links_on_modified_at"
239   add_index "links", ["tail_kind"], :name => "index_links_on_tail_kind"
240   add_index "links", ["tail_uuid"], :name => "index_links_on_tail_uuid"
241   add_index "links", ["uuid"], :name => "index_links_on_uuid", :unique => true
242
243   create_table "logs", :force => true do |t|
244     t.string   "uuid"
245     t.string   "owner"
246     t.string   "modified_by_client"
247     t.string   "modified_by_user"
248     t.string   "object_kind"
249     t.string   "object_uuid"
250     t.datetime "event_at"
251     t.string   "event_type"
252     t.text     "summary"
253     t.text     "info"
254     t.datetime "created_at"
255     t.datetime "updated_at"
256     t.datetime "modified_at"
257   end
258
259   add_index "logs", ["created_at"], :name => "index_logs_on_created_at"
260   add_index "logs", ["event_at"], :name => "index_logs_on_event_at"
261   add_index "logs", ["event_type"], :name => "index_logs_on_event_type"
262   add_index "logs", ["modified_at"], :name => "index_logs_on_modified_at"
263   add_index "logs", ["object_kind"], :name => "index_logs_on_object_kind"
264   add_index "logs", ["object_uuid"], :name => "index_logs_on_object_uuid"
265   add_index "logs", ["summary"], :name => "index_logs_on_summary"
266   add_index "logs", ["uuid"], :name => "index_logs_on_uuid", :unique => true
267
268   create_table "nodes", :force => true do |t|
269     t.string   "uuid"
270     t.string   "owner"
271     t.datetime "created_at"
272     t.string   "modified_by_client"
273     t.string   "modified_by_user"
274     t.datetime "modified_at"
275     t.integer  "slot_number"
276     t.string   "hostname"
277     t.string   "domain"
278     t.string   "ip_address"
279     t.datetime "first_ping_at"
280     t.datetime "last_ping_at"
281     t.text     "info"
282     t.datetime "updated_at"
283   end
284
285   add_index "nodes", ["created_at"], :name => "index_nodes_on_created_at"
286   add_index "nodes", ["hostname"], :name => "index_nodes_on_hostname"
287   add_index "nodes", ["modified_at"], :name => "index_nodes_on_modified_at"
288   add_index "nodes", ["slot_number"], :name => "index_nodes_on_slot_number", :unique => true
289   add_index "nodes", ["uuid"], :name => "index_nodes_on_uuid", :unique => true
290
291   create_table "pipeline_instances", :force => true do |t|
292     t.string   "uuid"
293     t.string   "owner"
294     t.datetime "created_at"
295     t.string   "modified_by_client"
296     t.string   "modified_by_user"
297     t.datetime "modified_at"
298     t.string   "pipeline_template_uuid"
299     t.string   "name"
300     t.text     "components"
301     t.boolean  "success"
302     t.boolean  "active",                 :default => false
303     t.datetime "updated_at"
304     t.text     "properties"
305   end
306
307   add_index "pipeline_instances", ["created_at"], :name => "index_pipeline_instances_on_created_at"
308   add_index "pipeline_instances", ["modified_at"], :name => "index_pipeline_instances_on_modified_at"
309   add_index "pipeline_instances", ["uuid"], :name => "index_pipeline_instances_on_uuid", :unique => true
310
311   create_table "pipeline_templates", :force => true do |t|
312     t.string   "uuid"
313     t.string   "owner"
314     t.datetime "created_at"
315     t.string   "modified_by_client"
316     t.string   "modified_by_user"
317     t.datetime "modified_at"
318     t.string   "name"
319     t.text     "components"
320     t.datetime "updated_at"
321   end
322
323   add_index "pipeline_templates", ["created_at"], :name => "index_pipeline_templates_on_created_at"
324   add_index "pipeline_templates", ["modified_at"], :name => "index_pipeline_templates_on_modified_at"
325   add_index "pipeline_templates", ["uuid"], :name => "index_pipeline_templates_on_uuid", :unique => true
326
327   create_table "repositories", :force => true do |t|
328     t.string   "uuid",               :null => false
329     t.string   "owner",              :null => false
330     t.string   "modified_by_client"
331     t.string   "modified_by_user"
332     t.datetime "modified_at"
333     t.string   "name"
334     t.string   "fetch_url"
335     t.string   "push_url"
336     t.datetime "created_at"
337     t.datetime "updated_at"
338   end
339
340   add_index "repositories", ["name"], :name => "index_repositories_on_name", :unique => true
341   add_index "repositories", ["uuid"], :name => "index_repositories_on_uuid", :unique => true
342
343   create_table "specimens", :force => true do |t|
344     t.string   "uuid"
345     t.string   "owner"
346     t.datetime "created_at"
347     t.string   "modified_by_client"
348     t.string   "modified_by_user"
349     t.datetime "modified_at"
350     t.string   "material"
351     t.datetime "updated_at"
352     t.text     "properties"
353   end
354
355   add_index "specimens", ["created_at"], :name => "index_specimens_on_created_at"
356   add_index "specimens", ["modified_at"], :name => "index_specimens_on_modified_at"
357   add_index "specimens", ["uuid"], :name => "index_specimens_on_uuid", :unique => true
358
359   create_table "users", :force => true do |t|
360     t.string   "uuid"
361     t.string   "owner"
362     t.datetime "created_at"
363     t.string   "modified_by_client"
364     t.string   "modified_by_user"
365     t.datetime "modified_at"
366     t.string   "email"
367     t.string   "first_name"
368     t.string   "last_name"
369     t.string   "identity_url"
370     t.boolean  "is_admin"
371     t.text     "prefs"
372     t.datetime "updated_at"
373     t.string   "default_owner"
374     t.boolean  "is_active",          :default => false
375   end
376
377   add_index "users", ["created_at"], :name => "index_users_on_created_at"
378   add_index "users", ["modified_at"], :name => "index_users_on_modified_at"
379   add_index "users", ["uuid"], :name => "index_users_on_uuid", :unique => true
380
381   create_table "virtual_machines", :force => true do |t|
382     t.string   "uuid",               :null => false
383     t.string   "owner",              :null => false
384     t.string   "modified_by_client"
385     t.string   "modified_by_user"
386     t.datetime "modified_at"
387     t.string   "hostname"
388     t.datetime "created_at"
389     t.datetime "updated_at"
390   end
391
392   add_index "virtual_machines", ["hostname"], :name => "index_virtual_machines_on_hostname"
393   add_index "virtual_machines", ["uuid"], :name => "index_virtual_machines_on_uuid", :unique => true
394
395 end