From b112155134d12f9bf3e9ac1600e162d91f6934b7 Mon Sep 17 00:00:00 2001 From: Teemu Patja Date: Thu, 23 Feb 2017 13:23:20 +0200 Subject: [PATCH] Add debug logging, add forgotten column constraint --- resources/migrations/20170220210009-comment-png-storage.up.sql | 2 +- src/clj/commiteth/util/png_rendering.clj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/migrations/20170220210009-comment-png-storage.up.sql b/resources/migrations/20170220210009-comment-png-storage.up.sql index 48a4dae..390c265 100644 --- a/resources/migrations/20170220210009-comment-png-storage.up.sql +++ b/resources/migrations/20170220210009-comment-png-storage.up.sql @@ -8,5 +8,5 @@ ALTER TABLE "issues" ADD UNIQUE ("issue_id"); -- table for github PNG comment images CREATE TABLE issue_comment ( id SERIAL PRIMARY KEY, -issue_id INTEGER REFERENCES issues (issue_id), +issue_id INTEGER REFERENCES issues (issue_id) UNIQUE, png_data bytea); diff --git a/src/clj/commiteth/util/png_rendering.clj b/src/clj/commiteth/util/png_rendering.clj index e26fef3..430ab0f 100644 --- a/src/clj/commiteth/util/png_rendering.clj +++ b/src/clj/commiteth/util/png_rendering.clj @@ -37,7 +37,7 @@ :out-enc :bytes :in html)] (if (= 0 exit) out - (do (log/error "Failed to generate PNG file" err) + (do (log/error "Failed to generate PNG file" err exit out) nil))))