Files
goclaw/migrations/000035_contact_thread_id.down.sql
viettranx 5d632a522e feat(db): add migration 35 for contact thread_id columns
Add thread_id, thread_type columns to track forum topics and threaded conversations.
2026-04-02 08:22:53 +07:00

6 lines
308 B
SQL

DROP INDEX IF EXISTS idx_channel_contacts_tenant_type_sender;
ALTER TABLE channel_contacts DROP COLUMN IF EXISTS thread_type;
ALTER TABLE channel_contacts DROP COLUMN IF EXISTS thread_id;
CREATE UNIQUE INDEX idx_channel_contacts_tenant_type_sender
ON channel_contacts (tenant_id, channel_type, sender_id);