Skip to content

Commit c7ee4f5

Browse files
authored
Add comments video url (#758)
1 parent bd4e86a commit c7ee4f5

4 files changed

Lines changed: 8 additions & 1 deletion

File tree

api/dbv1/full_comments.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ type FullComment struct {
3232
IsArtistReacted bool `json:"is_artist_reacted"`
3333
IsDelete bool `json:"-"`
3434
IsMembersOnly bool `json:"is_members_only"`
35+
VideoUrl *string `json:"video_url"`
3536
IsTombstone bool `json:"is_tombstone"`
3637
ReactCount int `json:"react_count"`
3738
CreatedAt time.Time `json:"created_at"`
@@ -110,6 +111,7 @@ func (q *Queries) FullCommentsKeyed(ctx context.Context, arg GetCommentsParams)
110111
111112
comments.is_delete,
112113
comments.is_members_only,
114+
comments.video_url,
113115
114116
coalesce((
115117
SELECT is_muted

api/dbv1/models.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
begin;
2+
alter table comments add column if not exists video_url text;
3+
commit;

sql/01_schema.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6780,7 +6780,8 @@ CREATE TABLE public.comments (
67806780
is_members_only boolean DEFAULT false NOT NULL,
67816781
txhash text NOT NULL,
67826782
blockhash text NOT NULL,
6783-
blocknumber integer
6783+
blocknumber integer,
6784+
video_url text
67846785
);
67856786

67866787

0 commit comments

Comments
 (0)