Files
vibe-kanban/crates/remote/migrations/20251216000000_add_webhook_fields_to_reviews.sql
Louis Knight-Webb fd9e5e5d79 Remote review (#1521)
2025-12-15 19:42:13 +00:00

16 lines
478 B
SQL

-- Make email and ip_address nullable for webhook-triggered reviews
ALTER TABLE reviews
ALTER COLUMN email DROP NOT NULL,
ALTER COLUMN ip_address DROP NOT NULL;
-- Add webhook-specific columns
ALTER TABLE reviews
ADD COLUMN github_installation_id BIGINT,
ADD COLUMN pr_owner TEXT,
ADD COLUMN pr_repo TEXT,
ADD COLUMN pr_number INTEGER;
-- Index for webhook reviews
CREATE INDEX idx_reviews_webhook ON reviews (github_installation_id)
WHERE github_installation_id IS NOT NULL;