   (try
     (f)
     (catch java.sql.SQLException e
-      (log/error e "Caught SQLException during migration")
+      (log/error e (trs "Caught SQLException during migration"))
       (when-let [next (.getNextException e)]
-        (log/error next "Unravelled exception"))
+        (log/error next (trs "Unravelled exception")))
       (binding [*out* *err*] (flush)) (flush)
       (System/exit 1))))
 

      (trgm-indexes!)
      (log/warn
       (str
        "Missing PostgreSQL extension `pg_trgm`\n\n"
        "We are unable to create the recommended pg_trgm indexes due to\n"
        "the extension not being installed correctly. Run the command:\n\n"
        "    CREATE EXTENSION pg_trgm;\n\n"
        "as the database super user on the PuppetDB database to correct\n"
        "this, then restart PuppetDB.\n")))))

        (sutils/analyze-small-tables small-tables)
        true)
      (do
        (log/info (trs "There are no pending migrations"))
        false))))

;; SPECIAL INDEX HANDLING
