From 8fb363218a164b9d3b07aa29397a567cdc844cf5 Mon Sep 17 00:00:00 2001 From: kagel Date: Mon, 12 Sep 2016 19:44:29 +0300 Subject: [PATCH] Edit github comment on balance update --- project.clj | 1 + .../20160905235051-contracts.down.sql | 2 ++ .../20160905235051-contracts.up.sql | 2 ++ resources/sql/queries.sql | 27 ++++++++++++++++--- src/clj/commiteth/db/bounties.clj | 7 ++++- src/clj/commiteth/db/issues.clj | 7 +++++ src/clj/commiteth/github/core.clj | 26 ++++++++++++++---- src/clj/commiteth/routes/qrcodes.clj | 25 +++++++++-------- src/clj/commiteth/scheduler.clj | 19 ++++++++++--- 9 files changed, 93 insertions(+), 23 deletions(-) diff --git a/project.clj b/project.clj index abe057d..ba3a674 100644 --- a/project.clj +++ b/project.clj @@ -39,6 +39,7 @@ [luminus-immutant "0.2.2"] [overtone/at-at "1.2.0"] [clj.qrgen "0.4.0"] + [digest "1.4.4"] [tentacles "0.5.1"]] :min-lein-version "2.0.0" diff --git a/resources/migrations/20160905235051-contracts.down.sql b/resources/migrations/20160905235051-contracts.down.sql index 1fd9a7b..b4f2c4f 100644 --- a/resources/migrations/20160905235051-contracts.down.sql +++ b/resources/migrations/20160905235051-contracts.down.sql @@ -7,3 +7,5 @@ ALTER TABLE public.issues DROP COLUMN confirm_hash; ALTER TABLE public.issues ADD address VARCHAR(256); +ALTER TABLE public.issues + DROP COLUMN comment_id; diff --git a/resources/migrations/20160905235051-contracts.up.sql b/resources/migrations/20160905235051-contracts.up.sql index 6be7006..fae02f6 100644 --- a/resources/migrations/20160905235051-contracts.up.sql +++ b/resources/migrations/20160905235051-contracts.up.sql @@ -4,6 +4,8 @@ ALTER TABLE public.issues ADD contract_address VARCHAR(42) NULL; ALTER TABLE public.issues ADD confirm_hash VARCHAR(128) NULL; +ALTER TABLE public.issues + ADD comment_id INTEGER NULL; -- noinspection SqlResolve ALTER TABLE public.issues DROP COLUMN address; diff --git a/resources/sql/queries.sql b/resources/sql/queries.sql index 9fd68dc..19d3417 100644 --- a/resources/sql/queries.sql +++ b/resources/sql/queries.sql @@ -129,6 +129,12 @@ SET contract_address = :contract_address FROM t RETURNING t.issue_id, t.issue_number, t.title, t.transaction_hash, t.contract_address, t.login, t.repo, t.repo_id; +-- :name update-comment-id :