status-go/protocol/migrations/sqlite/1623938330_add_edit_messages.up.sql

14 lines
369 B
MySQL
Raw Normal View History

2021-06-07 10:31:27 +02:00
ALTER TABLE user_messages ADD COLUMN edited_at INTEGER;
CREATE TABLE user_messages_edits (
clock INTEGER NOT NULL,
chat_id VARCHAR NOT NULL,
message_id VARCHAR NOT NULL,
source VARCHAR NOT NULL,
text VARCHAR NOT NULL,
2021-06-07 13:45:06 +02:00
id VARCHAR NOT NULL,
PRIMARY KEY(id)
2021-06-07 10:31:27 +02:00
);
2021-06-08 08:07:45 +02:00
CREATE INDEX user_messages_edits_message_id_source ON user_messages_edits(message_id, source);