From 6f2cb1c2a5cdb8d8ed2a55dce50d5763f87578c4 Mon Sep 17 00:00:00 2001 From: Teemu Patja Date: Fri, 27 Oct 2017 09:19:47 +0300 Subject: [PATCH] Only show claim related events in activity feed --- ...1551-only-claims-in-activity-feed.down.sql | 0 ...091551-only-claims-in-activity-feed.up.sql | 28 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 resources/migrations/20171027091551-only-claims-in-activity-feed.down.sql create mode 100644 resources/migrations/20171027091551-only-claims-in-activity-feed.up.sql diff --git a/resources/migrations/20171027091551-only-claims-in-activity-feed.down.sql b/resources/migrations/20171027091551-only-claims-in-activity-feed.down.sql new file mode 100644 index 0000000..e69de29 diff --git a/resources/migrations/20171027091551-only-claims-in-activity-feed.up.sql b/resources/migrations/20171027091551-only-claims-in-activity-feed.up.sql new file mode 100644 index 0000000..14e5b14 --- /dev/null +++ b/resources/migrations/20171027091551-only-claims-in-activity-feed.up.sql @@ -0,0 +1,28 @@ +CREATE OR REPLACE VIEW "public"."activity_feed_view" AS SELECT 'open-claim'::text AS type, + claims_view.issue_title, + claims_view.repo_name, + claims_view.repo_owner, + claims_view.issue_number, + claims_view.user_name, + claims_view.user_avatar_url, + claims_view.balance_eth, + claims_view.tokens, + claims_view.value_usd, + claims_view.updated + FROM claims_view + WHERE claims_view.pr_state = 0 AND claims_view.payout_receipt IS NULL AND claims_view.issue_open IS TRUE +UNION + SELECT 'claim-payout'::text AS type, + claims_view.issue_title, + claims_view.repo_name, + claims_view.repo_owner, + claims_view.issue_number, + claims_view.user_name, + claims_view.user_avatar_url, + claims_view.balance_eth, + claims_view.tokens, + claims_view.value_usd, + claims_view.updated + FROM claims_view + WHERE claims_view.pr_state = 1 AND claims_view.payout_receipt IS NOT NULL + ORDER BY 11 DESC;