From 368d1f9427ec1cf9de6e17f6bdb074cd33402996 Mon Sep 17 00:00:00 2001 From: hobokenchicken Date: Mon, 29 Jun 2026 14:05:56 -0400 Subject: [PATCH] fix: ensure reply_to column exists via ALTER TABLE in migration --- internal/db/db.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/db/db.go b/internal/db/db.go index a46497f..a35d472 100644 --- a/internal/db/db.go +++ b/internal/db/db.go @@ -189,6 +189,9 @@ CREATE INDEX IF NOT EXISTS idx_webhooks_token ON webhooks(token); ALTER TABLE webhooks ADD COLUMN IF NOT EXISTS token_hash VARCHAR(64); CREATE INDEX IF NOT EXISTS idx_webhooks_token_hash ON webhooks(token_hash); +-- Ensure reply_to column exists on messages (added after initial table creation) +ALTER TABLE messages ADD COLUMN IF NOT EXISTS reply_to UUID REFERENCES messages(id) ON DELETE SET NULL; + CREATE TABLE IF NOT EXISTS push_subscriptions ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,