status-go/protocol/migrations/sqlite/1615374373_add_confirmations.up.sql
Andrea Maria Piana f75f7bb738 Expand confirmations to private group chat messages
This commit expands the confirmation mechanism to allow private group
chat messages to be confirmed:

Changes:

- Added a separate table for message confirmations as group chat
messages have same messageID but multiple datasyncID
- Removed DataSyncID from raw message (I haven't removed the column name
as it can't be done in sqlite without copying over the table)
2021-03-16 13:41:14 +01:00

8 lines
227 B
SQL

CREATE TABLE raw_message_confirmations (
datasync_id BLOB NOT NULL,
message_id BLOB NOT NULL,
public_key BLOB NOT NULL,
confirmed_at INT NOT NULL DEFAULT 0,
PRIMARY KEY (message_id, public_key) ON CONFLICT REPLACE
);