diff --git a/migrations/20260613211440_init.sql b/migrations/20260613211440_init.sql index 0ab6ba3..7be9c7b 100644 --- a/migrations/20260613211440_init.sql +++ b/migrations/20260613211440_init.sql @@ -32,3 +32,14 @@ CREATE TABLE IF NOT EXISTS "scheduled_message_events" ( scheduled_message_id UUID NOT NULL, created timestamptz DEFAULT now() ); + +CREATE TABLE IF NOT EXISTS "message_event_responses" ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + scheduled_message_event_id UUID NULL, + response JSONB NOT NULL, + user_id UUID NOT NULL, + sent timestamptz NOT NULL, + contact_id UUID NULL, + message_id UUID NULL, + status TEXT CHECK (status IN ('INSTANT', 'SCHEDULED')) +);