fix job_task qsequence and delete_all usage
[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 => 20130524042319) 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   end
45
46   add_index "api_clients", ["created_at"], :name => "index_api_clients_on_created_at"
47   add_index "api_clients", ["modified_at"], :name => "index_api_clients_on_modified_at"
48   add_index "api_clients", ["uuid"], :name => "index_api_clients_on_uuid", :unique => true
49
50   create_table "collections", :force => true do |t|
51     t.string   "locator"
52     t.string   "owner"
53     t.datetime "created_at"
54     t.string   "modified_by_client"
55     t.string   "modified_by_user"
56     t.datetime "modified_at"
57     t.string   "portable_data_hash"
58     t.string   "name"
59     t.integer  "redundancy"
60     t.string   "redundancy_confirmed_by_client"
61     t.datetime "redundancy_confirmed_at"
62     t.integer  "redundancy_confirmed_as"
63     t.datetime "updated_at"
64     t.string   "uuid"
65     t.text     "manifest_text"
66   end
67
68   add_index "collections", ["created_at"], :name => "index_collections_on_created_at"
69   add_index "collections", ["modified_at"], :name => "index_collections_on_modified_at"
70   add_index "collections", ["uuid"], :name => "index_collections_on_uuid", :unique => true
71
72   create_table "commit_ancestors", :force => true do |t|
73     t.string   "repository_name"
74     t.string   "descendant",                         :null => false
75     t.string   "ancestor",                           :null => false
76     t.boolean  "is",              :default => false, :null => false
77     t.datetime "created_at"
78     t.datetime "updated_at"
79   end
80
81   add_index "commit_ancestors", ["descendant", "ancestor"], :name => "index_commit_ancestors_on_descendant_and_ancestor", :unique => true
82
83   create_table "commits", :force => true do |t|
84     t.string   "repository_name"
85     t.string   "sha1"
86     t.string   "message"
87     t.datetime "created_at"
88     t.datetime "updated_at"
89   end
90
91   add_index "commits", ["repository_name", "sha1"], :name => "index_commits_on_repository_name_and_sha1", :unique => true
92
93   create_table "groups", :force => true do |t|
94     t.string   "uuid"
95     t.string   "owner"
96     t.datetime "created_at"
97     t.string   "modified_by_client"
98     t.string   "modified_by_user"
99     t.datetime "modified_at"
100     t.string   "name"
101     t.text     "description"
102     t.datetime "updated_at"
103   end
104
105   add_index "groups", ["created_at"], :name => "index_groups_on_created_at"
106   add_index "groups", ["modified_at"], :name => "index_groups_on_modified_at"
107   add_index "groups", ["uuid"], :name => "index_groups_on_uuid", :unique => true
108
109   create_table "job_tasks", :force => true do |t|
110     t.string   "uuid"
111     t.string   "owner"
112     t.string   "modified_by_client"
113     t.string   "modified_by_user"
114     t.datetime "modified_at"
115     t.string   "job_uuid"
116     t.integer  "sequence"
117     t.text     "parameters"
118     t.text     "output"
119     t.float    "progress"
120     t.boolean  "success"
121     t.datetime "created_at"
122     t.datetime "updated_at"
123     t.string   "created_by_job_task"
124     t.integer  "qsequence",           :limit => 8
125   end
126
127   add_index "job_tasks", ["created_at"], :name => "index_job_tasks_on_created_at"
128   add_index "job_tasks", ["job_uuid"], :name => "index_job_tasks_on_job_uuid"
129   add_index "job_tasks", ["modified_at"], :name => "index_job_tasks_on_modified_at"
130   add_index "job_tasks", ["sequence"], :name => "index_job_tasks_on_sequence"
131   add_index "job_tasks", ["success"], :name => "index_job_tasks_on_success"
132   add_index "job_tasks", ["uuid"], :name => "index_job_tasks_on_uuid", :unique => true
133
134   create_table "jobs", :force => true do |t|
135     t.string   "uuid"
136     t.string   "owner"
137     t.string   "modified_by_client"
138     t.string   "modified_by_user"
139     t.datetime "modified_at"
140     t.string   "submit_id"
141     t.string   "script"
142     t.string   "script_version"
143     t.text     "script_parameters"
144     t.string   "cancelled_by_client"
145     t.string   "cancelled_by_user"
146     t.datetime "cancelled_at"
147     t.datetime "started_at"
148     t.datetime "finished_at"
149     t.boolean  "running"
150     t.boolean  "success"
151     t.string   "output"
152     t.datetime "created_at"
153     t.datetime "updated_at"
154     t.string   "priority"
155     t.string   "is_locked_by"
156     t.string   "log"
157     t.text     "tasks_summary"
158     t.text     "resource_limits"
159   end
160
161   add_index "jobs", ["created_at"], :name => "index_jobs_on_created_at"
162   add_index "jobs", ["finished_at"], :name => "index_jobs_on_finished_at"
163   add_index "jobs", ["modified_at"], :name => "index_jobs_on_modified_at"
164   add_index "jobs", ["output"], :name => "index_jobs_on_output"
165   add_index "jobs", ["script"], :name => "index_jobs_on_script"
166   add_index "jobs", ["started_at"], :name => "index_jobs_on_started_at"
167   add_index "jobs", ["submit_id"], :name => "index_jobs_on_submit_id", :unique => true
168   add_index "jobs", ["uuid"], :name => "index_jobs_on_uuid", :unique => true
169
170   create_table "keep_disks", :force => true do |t|
171     t.string   "uuid",                                 :null => false
172     t.string   "owner",                                :null => false
173     t.string   "modified_by_client"
174     t.string   "modified_by_user"
175     t.datetime "modified_at"
176     t.string   "ping_secret",                          :null => false
177     t.string   "node_uuid"
178     t.string   "filesystem_uuid"
179     t.integer  "bytes_total"
180     t.integer  "bytes_free"
181     t.boolean  "is_readable",        :default => true, :null => false
182     t.boolean  "is_writable",        :default => true, :null => false
183     t.datetime "last_read_at"
184     t.datetime "last_write_at"
185     t.datetime "last_ping_at"
186     t.datetime "created_at"
187     t.datetime "updated_at"
188     t.string   "service_host"
189     t.integer  "service_port"
190     t.boolean  "service_ssl_flag"
191   end
192
193   add_index "keep_disks", ["filesystem_uuid"], :name => "index_keep_disks_on_filesystem_uuid"
194   add_index "keep_disks", ["last_ping_at"], :name => "index_keep_disks_on_last_ping_at"
195   add_index "keep_disks", ["node_uuid"], :name => "index_keep_disks_on_node_uuid"
196   add_index "keep_disks", ["service_host", "service_port", "last_ping_at"], :name => "keep_disks_service_host_port_ping_at_index"
197   add_index "keep_disks", ["uuid"], :name => "index_keep_disks_on_uuid", :unique => true
198
199   create_table "links", :force => true do |t|
200     t.string   "uuid"
201     t.string   "owner"
202     t.datetime "created_at"
203     t.string   "modified_by_client"
204     t.string   "modified_by_user"
205     t.datetime "modified_at"
206     t.string   "tail_uuid"
207     t.string   "tail_kind"
208     t.string   "link_class"
209     t.string   "name"
210     t.string   "head_uuid"
211     t.text     "properties"
212     t.datetime "updated_at"
213     t.string   "head_kind"
214   end
215
216   add_index "links", ["created_at"], :name => "index_links_on_created_at"
217   add_index "links", ["head_kind"], :name => "index_links_on_head_kind"
218   add_index "links", ["head_uuid"], :name => "index_links_on_head_uuid"
219   add_index "links", ["modified_at"], :name => "index_links_on_modified_at"
220   add_index "links", ["tail_kind"], :name => "index_links_on_tail_kind"
221   add_index "links", ["tail_uuid"], :name => "index_links_on_tail_uuid"
222   add_index "links", ["uuid"], :name => "index_links_on_uuid", :unique => true
223
224   create_table "logs", :force => true do |t|
225     t.string   "uuid"
226     t.string   "owner"
227     t.string   "modified_by_client"
228     t.string   "modified_by_user"
229     t.string   "object_kind"
230     t.string   "object_uuid"
231     t.datetime "event_at"
232     t.string   "event_type"
233     t.text     "summary"
234     t.text     "info"
235     t.datetime "created_at"
236     t.datetime "updated_at"
237     t.datetime "modified_at"
238   end
239
240   add_index "logs", ["created_at"], :name => "index_logs_on_created_at"
241   add_index "logs", ["event_at"], :name => "index_logs_on_event_at"
242   add_index "logs", ["event_type"], :name => "index_logs_on_event_type"
243   add_index "logs", ["modified_at"], :name => "index_logs_on_modified_at"
244   add_index "logs", ["object_kind"], :name => "index_logs_on_object_kind"
245   add_index "logs", ["object_uuid"], :name => "index_logs_on_object_uuid"
246   add_index "logs", ["summary"], :name => "index_logs_on_summary"
247   add_index "logs", ["uuid"], :name => "index_logs_on_uuid", :unique => true
248
249   create_table "nodes", :force => true do |t|
250     t.string   "uuid"
251     t.string   "owner"
252     t.datetime "created_at"
253     t.string   "modified_by_client"
254     t.string   "modified_by_user"
255     t.datetime "modified_at"
256     t.integer  "slot_number"
257     t.string   "hostname"
258     t.string   "domain"
259     t.string   "ip_address"
260     t.datetime "first_ping_at"
261     t.datetime "last_ping_at"
262     t.text     "info"
263     t.datetime "updated_at"
264   end
265
266   add_index "nodes", ["created_at"], :name => "index_nodes_on_created_at"
267   add_index "nodes", ["hostname"], :name => "index_nodes_on_hostname", :unique => true
268   add_index "nodes", ["modified_at"], :name => "index_nodes_on_modified_at"
269   add_index "nodes", ["slot_number"], :name => "index_nodes_on_slot_number", :unique => true
270   add_index "nodes", ["uuid"], :name => "index_nodes_on_uuid", :unique => true
271
272   create_table "pipeline_instances", :force => true do |t|
273     t.string   "uuid"
274     t.string   "owner"
275     t.datetime "created_at"
276     t.string   "modified_by_client"
277     t.string   "modified_by_user"
278     t.datetime "modified_at"
279     t.string   "pipeline_template_uuid"
280     t.string   "name"
281     t.text     "components"
282     t.boolean  "success"
283     t.boolean  "active",                 :default => false
284     t.datetime "updated_at"
285     t.text     "properties"
286   end
287
288   add_index "pipeline_instances", ["created_at"], :name => "index_pipeline_instances_on_created_at"
289   add_index "pipeline_instances", ["modified_at"], :name => "index_pipeline_instances_on_modified_at"
290   add_index "pipeline_instances", ["uuid"], :name => "index_pipeline_instances_on_uuid", :unique => true
291
292   create_table "pipeline_templates", :force => true do |t|
293     t.string   "uuid"
294     t.string   "owner"
295     t.datetime "created_at"
296     t.string   "modified_by_client"
297     t.string   "modified_by_user"
298     t.datetime "modified_at"
299     t.string   "name"
300     t.text     "components"
301     t.datetime "updated_at"
302   end
303
304   add_index "pipeline_templates", ["created_at"], :name => "index_pipeline_templates_on_created_at"
305   add_index "pipeline_templates", ["modified_at"], :name => "index_pipeline_templates_on_modified_at"
306   add_index "pipeline_templates", ["uuid"], :name => "index_pipeline_templates_on_uuid", :unique => true
307
308   create_table "specimens", :force => true do |t|
309     t.string   "uuid"
310     t.string   "owner"
311     t.datetime "created_at"
312     t.string   "modified_by_client"
313     t.string   "modified_by_user"
314     t.datetime "modified_at"
315     t.string   "material"
316     t.datetime "updated_at"
317     t.text     "properties"
318   end
319
320   add_index "specimens", ["created_at"], :name => "index_specimens_on_created_at"
321   add_index "specimens", ["modified_at"], :name => "index_specimens_on_modified_at"
322   add_index "specimens", ["uuid"], :name => "index_specimens_on_uuid", :unique => true
323
324   create_table "users", :force => true do |t|
325     t.string   "uuid"
326     t.string   "owner"
327     t.datetime "created_at"
328     t.string   "modified_by_client"
329     t.string   "modified_by_user"
330     t.datetime "modified_at"
331     t.string   "email"
332     t.string   "first_name"
333     t.string   "last_name"
334     t.string   "identity_url"
335     t.boolean  "is_admin"
336     t.text     "prefs"
337     t.datetime "updated_at"
338     t.string   "default_owner"
339   end
340
341   add_index "users", ["created_at"], :name => "index_users_on_created_at"
342   add_index "users", ["modified_at"], :name => "index_users_on_modified_at"
343   add_index "users", ["uuid"], :name => "index_users_on_uuid", :unique => true
344
345 end