api: Rename Log.info to .properties.
authorBrett Smith <brett@curoverse.com>
Mon, 7 Apr 2014 18:54:06 +0000 (14:54 -0400)
committerBrett Smith <brett@curoverse.com>
Tue, 8 Apr 2014 20:40:49 +0000 (16:40 -0400)
Refs #2375.

services/api/app/models/log.rb
services/api/db/migrate/20140407184311_rename_log_info_to_properties.rb [new file with mode: 0644]
services/api/db/schema.rb

index 29efc9dc1136427e471d63ce3aedd0caaf58d193..94967605ca1e73f007adb8a860009ef362cc6bdd 100644 (file)
@@ -2,7 +2,7 @@ class Log < ArvadosModel
   include AssignUuid
   include KindAndEtag
   include CommonApiTemplate
-  serialize :info, Hash
+  serialize :properties, Hash
   before_validation :set_default_event_at
   attr_accessor :object
 
@@ -13,7 +13,7 @@ class Log < ArvadosModel
     t.add :event_at
     t.add :event_type
     t.add :summary
-    t.add :info
+    t.add :properties
   end
 
   protected
diff --git a/services/api/db/migrate/20140407184311_rename_log_info_to_properties.rb b/services/api/db/migrate/20140407184311_rename_log_info_to_properties.rb
new file mode 100644 (file)
index 0000000..06561c5
--- /dev/null
@@ -0,0 +1,5 @@
+class RenameLogInfoToProperties < ActiveRecord::Migration
+  def change
+    rename_column :logs, :info, :properties
+  end
+end
index fe31666694fee6a112b9c0f3af3febb92d3b9ceb..2ef90d27322bc0cf7e52d3651b78d0925f619818 100644 (file)
 #
 # It's strongly recommended to check this file into your version control system.
 
-ActiveRecord::Schema.define(:version => 20140402001908) do
+ActiveRecord::Schema.define(:version => 20140407184311) do
 
   create_table "api_client_authorizations", :force => true do |t|
-    t.string   "api_token",                                           :null => false
-    t.integer  "api_client_id",                                       :null => false
-    t.integer  "user_id",                                             :null => false
+    t.string   "api_token",                                             :null => false
+    t.integer  "api_client_id",                                         :null => false
+    t.integer  "user_id",                                               :null => false
     t.string   "created_by_ip_address"
     t.string   "last_used_by_ip_address"
     t.datetime "last_used_at"
     t.datetime "expires_at"
-    t.datetime "created_at",                                          :null => false
-    t.datetime "updated_at",                                          :null => false
+    t.datetime "created_at",                                            :null => false
+    t.datetime "updated_at",                                            :null => false
     t.string   "default_owner_uuid"
     t.text     "scopes",                  :default => "---\n- all\n", :null => false
   end
@@ -70,7 +70,7 @@ ActiveRecord::Schema.define(:version => 20140402001908) do
   create_table "collections", :force => true do |t|
     t.string   "locator"
     t.string   "owner_uuid"
-    t.datetime "created_at"
+    t.datetime "created_at",                          :null => false
     t.string   "modified_by_client_uuid"
     t.string   "modified_by_user_uuid"
     t.datetime "modified_at"
@@ -80,7 +80,7 @@ ActiveRecord::Schema.define(:version => 20140402001908) do
     t.string   "redundancy_confirmed_by_client_uuid"
     t.datetime "redundancy_confirmed_at"
     t.integer  "redundancy_confirmed_as"
-    t.datetime "updated_at"
+    t.datetime "updated_at",                          :null => false
     t.string   "uuid"
     t.text     "manifest_text"
   end
@@ -104,8 +104,8 @@ ActiveRecord::Schema.define(:version => 20140402001908) do
     t.string   "repository_name"
     t.string   "sha1"
     t.string   "message"
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",      :null => false
+    t.datetime "updated_at",      :null => false
   end
 
   add_index "commits", ["repository_name", "sha1"], :name => "index_commits_on_repository_name_and_sha1", :unique => true
@@ -133,8 +133,8 @@ ActiveRecord::Schema.define(:version => 20140402001908) do
     t.string   "modified_by_user_uuid"
     t.datetime "modified_at"
     t.text     "properties"
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",              :null => false
+    t.datetime "updated_at",              :null => false
   end
 
   add_index "humans", ["uuid"], :name => "index_humans_on_uuid", :unique => true
@@ -235,7 +235,7 @@ ActiveRecord::Schema.define(:version => 20140402001908) do
   create_table "links", :force => true do |t|
     t.string   "uuid"
     t.string   "owner_uuid"
-    t.datetime "created_at"
+    t.datetime "created_at",              :null => false
     t.string   "modified_by_client_uuid"
     t.string   "modified_by_user_uuid"
     t.datetime "modified_at"
@@ -245,7 +245,7 @@ ActiveRecord::Schema.define(:version => 20140402001908) do
     t.string   "name"
     t.string   "head_uuid"
     t.text     "properties"
-    t.datetime "updated_at"
+    t.datetime "updated_at",              :null => false
     t.string   "head_kind"
   end
 
@@ -267,7 +267,7 @@ ActiveRecord::Schema.define(:version => 20140402001908) do
     t.datetime "event_at"
     t.string   "event_type"
     t.text     "summary"
-    t.text     "info"
+    t.text     "properties"
     t.datetime "created_at",              :null => false
     t.datetime "updated_at",              :null => false
     t.datetime "modified_at"
@@ -308,7 +308,7 @@ ActiveRecord::Schema.define(:version => 20140402001908) do
   create_table "pipeline_instances", :force => true do |t|
     t.string   "uuid"
     t.string   "owner_uuid"
-    t.datetime "created_at"
+    t.datetime "created_at",                                 :null => false
     t.string   "modified_by_client_uuid"
     t.string   "modified_by_user_uuid"
     t.datetime "modified_at"
@@ -317,7 +317,7 @@ ActiveRecord::Schema.define(:version => 20140402001908) do
     t.text     "components"
     t.boolean  "success"
     t.boolean  "active",                  :default => false
-    t.datetime "updated_at"
+    t.datetime "updated_at",                                 :null => false
     t.text     "properties"
   end