2021-06-07 08:31:27 +00: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 11:45:06 +00:00
|
|
|
id VARCHAR NOT NULL,
|
|
|
|
PRIMARY KEY(id)
|
2021-06-07 08:31:27 +00:00
|
|
|
);
|
2021-06-08 06:07:45 +00:00
|
|
|
|
|
|
|
CREATE INDEX user_messages_edits_message_id_source ON user_messages_edits(message_id, source);
|