Review comments on phase diffs now survive page reloads and phase switches. Adds review_comments table (migration 0028), repository port/adapter (13th repo), tRPC procedures (listReviewComments, createReviewComment, resolveReviewComment, unresolveReviewComment), and replaces useState-based comments in ReviewTab with tRPC queries and mutations.
16 lines
562 B
SQL
16 lines
562 B
SQL
-- Add review_comments table for persisting inline review comments on phase diffs
|
|
CREATE TABLE IF NOT EXISTS review_comments (
|
|
id TEXT PRIMARY KEY NOT NULL,
|
|
phase_id TEXT NOT NULL REFERENCES phases(id) ON DELETE CASCADE,
|
|
file_path TEXT NOT NULL,
|
|
line_number INTEGER NOT NULL,
|
|
line_type TEXT NOT NULL,
|
|
body TEXT NOT NULL,
|
|
author TEXT NOT NULL DEFAULT 'you',
|
|
resolved INTEGER NOT NULL DEFAULT 0,
|
|
created_at INTEGER NOT NULL,
|
|
updated_at INTEGER NOT NULL
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS review_comments_phase_id_idx ON review_comments (phase_id);
|