status-go/protocol/migrations/sqlite/1625762506_add_deleted_messages.up.sql
Jonathan Rainville cdc7c55030
Delete messages (#2279)
* feat: add api and handling to delete messages

* fix(delete): add whitelist to message types that can be deleted
2021-07-26 17:06:32 -04:00

13 lines
357 B
SQL

ALTER TABLE user_messages ADD COLUMN deleted BOOL DEFAULT FALSE;
CREATE TABLE user_messages_deletes (
clock INTEGER NOT NULL,
chat_id VARCHAR NOT NULL,
message_id VARCHAR NOT NULL,
source VARCHAR NOT NULL,
id VARCHAR NOT NULL,
PRIMARY KEY(id)
);
CREATE INDEX user_messages_deletes_message_id_source ON user_messages_edits(message_id, source);