From 586c9a49bd121a1671fec8db92b37e0929332b18 Mon Sep 17 00:00:00 2001 From: Allen Gilliland <agilliland@gmail.com> Date: Mon, 6 Jun 2016 17:27:31 -0700 Subject: [PATCH] fix issue with lowercasing of column name which was causing issues with postgres, which allows for strict casing on column names. --- src/metabase/cmd/load_from_h2.clj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/metabase/cmd/load_from_h2.clj b/src/metabase/cmd/load_from_h2.clj index 326eff4eaa5..57cdf7256ee 100644 --- a/src/metabase/cmd/load_from_h2.clj +++ b/src/metabase/cmd/load_from_h2.clj @@ -75,7 +75,11 @@ (doseq [chunk (partition-all 300 objs)] (print (color/blue \.)) (flush) - (k/insert e (k/values chunk))) + (k/insert e (k/values (if (= e DashboardCard) + ;; mini-HACK to fix korma/h2 lowercasing these couple attributes + ;; luckily this is the only place in our schema where we have camel case names + (mapv #(set/rename-keys % {:sizex :sizeX, :sizey :sizeY}) chunk) + chunk)))) (println (color/green "[OK]"))) (defn- insert-self-referencing-entity [e objs] -- GitLab