rename more foreign uuid attributes
authorTom Clegg <tom@clinicalfuture.com>
Mon, 8 Jul 2013 18:32:29 +0000 (14:32 -0400)
committerTom Clegg <tom@clinicalfuture.com>
Mon, 8 Jul 2013 18:32:29 +0000 (14:32 -0400)
doc/api/Jobs.textile
services/api/app/models/job.rb
services/api/db/migrate/20130708182912_rename_job_foreign_uuid_attributes.rb [new file with mode: 0644]
services/api/db/schema.rb

index b9b08dcedb3423144cc38ee1d674ede65283775e..f0f7529e0d0ed20fb03fc58c98d093579b44cfd6 100644 (file)
@@ -50,8 +50,8 @@ table(table table-bordered table-condensed).
 |script_name|string|Name of MapReduce script||
 |script_parameters{}|list|Parameters passed to MapReduce script||
 |script_version|string|git commit/tree used when running the job|If the job has not started, this can be a tag/branch instead of an unambiguous commit id.|
-|cancelled_by_client|string|API client ID|Is null if job has not been cancelled|
-|cancelled_by_user|string|Authenticated user ID|Is null if job has not been cancelled|
+|cancelled_by_client_uuid|string|API client ID|Is null if job has not been cancelled|
+|cancelled_by_user_uuid|string|Authenticated user ID|Is null if job has not been cancelled|
 |cancelled_at|string|When job was cancelled|Is null if job has not been cancelled|
 |started_at|datetime|When job started running|Is null if job has not [yet] started|
 |finished_at|datetime|When job finished running|Is null if job has not [yet] finished|
index 9167d15d8adec8900af4740528a80b8daf8b0059..5d520007d1ecd0926da3b38de3758a3c93c72f81 100644 (file)
@@ -21,8 +21,8 @@ class Job < ArvadosModel
     t.add :script_parameters
     t.add :script_version
     t.add :cancelled_at
-    t.add :cancelled_by_client
-    t.add :cancelled_by_user
+    t.add :cancelled_by_client_uuid
+    t.add :cancelled_by_user_uuid
     t.add :started_at
     t.add :finished_at
     t.add :output
diff --git a/services/api/db/migrate/20130708182912_rename_job_foreign_uuid_attributes.rb b/services/api/db/migrate/20130708182912_rename_job_foreign_uuid_attributes.rb
new file mode 100644 (file)
index 0000000..b5c3396
--- /dev/null
@@ -0,0 +1,6 @@
+class RenameJobForeignUuidAttributes < ActiveRecord::Migration
+  def change
+    rename_column :jobs, :cancelled_by_client, :cancelled_by_client_uuid
+    rename_column :jobs, :cancelled_by_user, :cancelled_by_user_uuid
+  end
+end
index 37a9586c901377eca89a8b72b6a3edb3c32c01e2..80325d2eeefa212b195dfe8c97a99fe8da8c95e2 100644 (file)
@@ -11,7 +11,7 @@
 #
 # It's strongly recommended to check this file into your version control system.
 
-ActiveRecord::Schema.define(:version => 20130708163414) do
+ActiveRecord::Schema.define(:version => 20130708182912) do
 
   create_table "api_client_authorizations", :force => true do |t|
     t.string   "api_token",               :null => false
@@ -173,8 +173,8 @@ ActiveRecord::Schema.define(:version => 20130708163414) do
     t.string   "script"
     t.string   "script_version"
     t.text     "script_parameters"
-    t.string   "cancelled_by_client"
-    t.string   "cancelled_by_user"
+    t.string   "cancelled_by_client_uuid"
+    t.string   "cancelled_by_user_uuid"
     t.datetime "cancelled_at"
     t.datetime "started_at"
     t.datetime "finished_at"