         (r/without company [{:competition {:icon true}}])))
       (r/run c)))
 
+;; Update a sub-property of a section for a company
+(with-open [c (apply r/connect conn2)]
+  (-> (r/table "companies")
+      (r/get "open")
+      (r/update {:finances {:body "<p>It's time to learn. That's it, really. Put it in the hands of people we admire and trust, and <b>LEARN FAST</b>.</p><p><img src=\"https://cdn.filestackcontent.com/ge9NSlJTP2AXfwl0nGvk\" data-height=\"370\" data-width=\"555\"><br></p><p><br></p>"}})
+      (r/run c)))
+
+;; Get all the topic revisions for a company
 (aprint (with-open [c (apply r/connect conn2)]
   (-> (r/table "sections")
     (r/get-all ["buffer"] {:index "company-slug"})
     (r/run c))))
 
+;; Get all the topic revisions of a specific type for a company
 (aprint (with-open [c (apply r/connect conn2)]
   (-> (r/table "sections")
-    (r/get-all [["green-labs" "update"]] {:index "company-slug-section-name"})
+    (r/get-all [["open" "finances"]] {:index "company-slug-section-name"})
     (r/run c))))
 
+;; Remove all the topic revisions of a specific type for a company
 (with-open [c (apply r/connect conn2)]
   (-> (r/table "sections")
     (r/get-all [["open" "finances"]] {:index "company-slug-section-name"})
     (r/delete)
     (r/run c)))
 
+;; Get a topic revisions by ID
+(aprint (with-open [c (apply r/connect conn2)]
+  (-> (r/table "sections")
+    (r/get-all ["21c9ddd4-6d1c-47a5-b6c1-1308fed08523"] {:index "id"})
+    (r/run c))))
+
+;; Delete a topic revision by ID
+(with-open [c (apply r/connect conn2)]
+  (-> (r/table "sections")
+    (r/get-all ["c4b035a9-f33a-40a3-9c5f-49632e5f32d8"] {:index "id"})
+    (r/delete)
+    (r/run c)))
+
+;; Update a property of a topic revision by ID
+(with-open [c (apply r/connect conn2)]
+  (-> (r/table "sections")
+    (r/get-all ["5ee22ac8-91ba-408f-9afb-e7546512ce90"] {:index "id"})
+    (r/update {:created-at "2016-12-03T16:23:11.560Z" :updated-at "2016-12-03T16:23:11.560Z"})
+    (r/run c)))
+
+;; Remove a property from all topic revisions
 (with-open [c (apply r/connect conn2)]
   (-> (r/table "sections")
     (r/replace (r/fn [section]
       (r/without section [:core])))
     (r/run c)))
 
-(aprint (with-open [c (apply r/connect conn2)]
-  (-> (r/table "sections")
-    (r/get-all ["21c9ddd4-6d1c-47a5-b6c1-1308fed08523"] {:index "id"})
-    (r/run c))))
+;; Get all the stakeholder updates for a company
+(with-open [c (apply r/connect conn2)]
+  (-> (r/table "stakeholder_updates")
+    (r/get-all ["message-io"] {:index "company-slug"})
+    (r/run c)))
 
+;; Update the property of a stakeholder update by update slug
 (with-open [c (apply r/connect conn2)]
-  (-> (r/table "companies")
-      (r/get "open")
-      (r/update {:update {:body "<p>It's time to learn. That's it, really. Put it in the hands of people we admire and trust, and <b>LEARN FAST</b>.</p><p><img src=\"https://cdn.filestackcontent.com/ge9NSlJTP2AXfwl0nGvk\" data-height=\"370\" data-width=\"555\"><br></p><p><br></p>"}})
-      (r/run c)))
+  (-> (r/table "stakeholder_updates")
+    (r/get-all [["open" "investor-update-december-2016-819e6"]] {:index "company-slug-slug"})
+    (r/update {:marketing {:headline ""}})
+    (r/run c)))
 
 ;; Provide a new slug for a company
 (with-open [c (apply r/connect conn2)]

;; RethinkDB usage
(def conn2 [:host "127.0.0.1" :port 28015 :db "open_company"])

(aprint (with-open [c (apply r/connect conn2)]
  (-> (r/table "companies")
      (r/get "buffer")
      (r/run c))))

(with-open [c (apply r/connect conn2)]
  (-> (r/table "companies")
      (r/get "open")

(with-open [c (apply r/connect conn2)]
  (-> (r/table "companies")
      (r/get "open")
      (r/replace (r/fn [company]
        (r/without company [:mission])))
      (r/run c)))

;; Empty out the stakeholder update template
(with-open [c (apply r/connect conn2)]
  (-> (r/table "companies")
      (r/get "open")
      (r/update {:stakeholder-update (r/literal {:title "" :sections []})})
      (r/run c)))

;; Mark a company as public/private
(with-open [c (apply r/connect conn2)]
  (-> (r/table "companies")
      (r/get "startup-city")
      (r/update {:public true})
      (r/run c)))

;; Remove a sub-property of a topic from a company
(with-open [c (apply r/connect conn2)]
  (-> (r/table "companies")
      (r/get "startup-city")
