mirror of
https://github.com/block/buzz.git
synced 2026-10-27 04:30:52 +00:00
11 lines
385 B
SQL
11 lines
385 B
SQL
-- Add participant_hash column to channels for DM deduplication.
|
|
--
|
|
-- DMs are identified by the SHA-256 of their sorted participant pubkeys.
|
|
-- The unique index ensures that the same participant set maps to exactly one DM.
|
|
|
|
ALTER TABLE channels
|
|
ADD COLUMN participant_hash VARBINARY(32) AFTER max_members;
|
|
|
|
CREATE UNIQUE INDEX idx_channels_dm_hash
|
|
ON channels (participant_hash);
|