1
0
Fork 0
mirror of https://github.com/mautrix/whatsapp.git synced 2026-07-11 16:33:59 -04:00
mautrix-whatsapp/pkg/connector/wadb/upgrades/02-history-sync-message-sender.postgres.sql
2024-09-17 18:32:09 +03:00

6 lines
463 B
SQL

-- v2: Add sender JID to history sync messages
-- transaction: sqlite-fkey-off
ALTER TABLE whatsapp_history_sync_message ADD COLUMN sender_jid TEXT NOT NULL DEFAULT '';
ALTER TABLE whatsapp_history_sync_message ALTER COLUMN sender_jid DROP DEFAULT;
ALTER TABLE whatsapp_history_sync_message DROP CONSTRAINT whatsapp_history_sync_message_pkey;
ALTER TABLE whatsapp_history_sync_message ADD PRIMARY KEY (bridge_id, user_login_id, chat_jid, sender_jid, message_id);