From ffc415103d0fdea235dc3c8e278ed50ceb486a67 Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Wed, 13 May 2026 00:12:06 +0900 Subject: [PATCH] appview/db: restore legacy comments table appview db migration is failing when started from scratch. Signed-off-by: Seongmin Lee --- appview/db/db.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/appview/db/db.go b/appview/db/db.go index f10ad742..78049d17 100644 --- a/appview/db/db.go +++ b/appview/db/db.go @@ -117,6 +117,18 @@ func Make(ctx context.Context, dbPath string) (*DB, error) { unique(repo_at, issue_id), foreign key (repo_at) references repos(at_uri) on delete cascade ); + create table if not exists comments ( + id integer primary key autoincrement, + owner_did text not null, + issue_id integer not null, + repo_at text not null, + comment_id integer not null, + comment_at text not null, + body text not null, + created text not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')), + unique(issue_id, comment_id), + foreign key (repo_at, issue_id) references issues(repo_at, issue_id) on delete cascade + ); create table if not exists pulls ( -- identifiers id integer primary key autoincrement, -- 2.51.2