 
 
 ;; ## sync-table steps.
+
+;; ### 0) update-table-row-count!
+
+(defn update-table-display-name!
+  "Update the display_name of TABLE if it doesn't exist."
+  [table]
+  {:pre [(integer? (:id table))]}
+  (try
+    (when (nil? (:display_name table))
+      (upd Table (:id table) :display_name (common/name->human-readable-name (:name table))))
+    (catch Throwable e
+      (log/error (color/red (format "Unable to update display_name for %s: %s" (:name table) (.getMessage e)))))))
+
 
 ;; ### 1) update-table-row-count!
 


;; Each field-syncing function below should return FIELD with any updates that we made, or nil.
;; That way the next fn in the 'pipeline' won't trample over changes made by the last.

;; ### mark-url-field!


            (metabase.driver [interface :refer :all]
                             [query-processor :as qp])
            [metabase.driver.sync.queries :as queries]
            (metabase.models [common :as common]
                             [field :refer [Field] :as field]
                             [foreign-key :refer [ForeignKey]]
                             [table :refer [Table]])
            [metabase.util :as u]))
