add Job and JobStep resources
[arvados.git] / db / migrate / 20130203104818_create_jobs.rb
diff --git a/db/migrate/20130203104818_create_jobs.rb b/db/migrate/20130203104818_create_jobs.rb
new file mode 100644 (file)
index 0000000..f99bf88
--- /dev/null
@@ -0,0 +1,31 @@
+class CreateJobs < ActiveRecord::Migration
+  def change
+    create_table :jobs do |t|
+      t.string :uuid
+      t.string :owner
+      t.string :modified_by_client
+      t.string :modified_by_user
+      t.datetime :modified_at
+      t.string :submit_id
+      t.string :command
+      t.string :command_version
+      t.text :command_parameters
+      t.string :cancelled_by_client
+      t.string :cancelled_by_user
+      t.datetime :cancelled_at
+      t.datetime :started_at
+      t.datetime :finished_at
+      t.boolean :running
+      t.boolean :success
+      t.string :output
+
+      t.timestamps
+    end
+    add_index :jobs, :uuid, :unique => true
+    add_index :jobs, :submit_id, :unique => true
+    add_index :jobs, :command
+    add_index :jobs, :finished_at
+    add_index :jobs, :started_at
+    add_index :jobs, :output
+  end
+end