From b61ba761bc674bccc51cd125fdc8d6c64da47e87 Mon Sep 17 00:00:00 2001 From: devops Date: Thu, 15 Oct 2026 07:34:44 +0000 Subject: [PATCH] fix(support-chat): default conversation updated timestamp --- .../20261015000000_add_support_conversations/migration.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/prisma/migrations/20261015000000_add_support_conversations/migration.sql b/backend/prisma/migrations/20261015000000_add_support_conversations/migration.sql index e2708911..8ae5763f 100644 --- a/backend/prisma/migrations/20261015000000_add_support_conversations/migration.sql +++ b/backend/prisma/migrations/20261015000000_add_support_conversations/migration.sql @@ -1,4 +1,4 @@ -CREATE TABLE support_conversations (id UUID NOT NULL, user_id UUID, anonymous_browser_id VARCHAR(64), entry_path VARCHAR(512), product_slugs JSONB, topics JSONB, unanswered BOOLEAN NOT NULL DEFAULT false, needs_followup BOOLEAN NOT NULL DEFAULT false, escalation_signal BOOLEAN NOT NULL DEFAULT false, summary TEXT, summary_status VARCHAR(20) NOT NULL DEFAULT 'pending', created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMPTZ NOT NULL, expires_at TIMESTAMPTZ NOT NULL, CONSTRAINT support_conversations_pkey PRIMARY KEY (id)); +CREATE TABLE support_conversations (id UUID NOT NULL, user_id UUID, anonymous_browser_id VARCHAR(64), entry_path VARCHAR(512), product_slugs JSONB, topics JSONB, unanswered BOOLEAN NOT NULL DEFAULT false, needs_followup BOOLEAN NOT NULL DEFAULT false, escalation_signal BOOLEAN NOT NULL DEFAULT false, summary TEXT, summary_status VARCHAR(20) NOT NULL DEFAULT 'pending', created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP, expires_at TIMESTAMPTZ NOT NULL, CONSTRAINT support_conversations_pkey PRIMARY KEY (id)); CREATE TABLE support_conversation_messages (id UUID NOT NULL, conversation_id UUID NOT NULL, role VARCHAR(20) NOT NULL, content TEXT NOT NULL, sequence INTEGER NOT NULL, created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP, CONSTRAINT support_conversation_messages_pkey PRIMARY KEY (id)); CREATE UNIQUE INDEX support_conversation_messages_conversation_id_sequence_key ON support_conversation_messages(conversation_id, sequence); CREATE INDEX support_conversations_user_id_updated_at_idx ON support_conversations(user_id, updated_at);