open-bounty/resources/migrations/20170315181738-repo-owner-avatar.up.sql
Teemu Patja 3ba4956a78
Show bounty open & balance update feed items in context of repo
For bounty related activity feed items:
* show full repository name in activity item title instead of admin name
* show owner avatar instead of admin avatar

Fixes: #41
2017-03-16 22:44:34 +02:00

19 lines
522 B
SQL

ALTER TABLE "public"."repositories" ADD COLUMN "owner_avatar_url" character varying(255);
create or replace view bounties_view as
select
i.title as issue_title,
i.issue_number,
r.repo as repo_name,
r.owner as repo_owner,
concat(r.owner, '/', r.repo)::varchar(128) as user_name,
r.owner_avatar_url as user_avatar_url,
i.payout_receipt,
i.balance,
i.updated as updated
FROM issues i, repositories r
WHERE r.repo_id = i.repo_id
and contract_address is not null
and comment_id is not null
order by updated;