created emoji_reaction table migration

Signed-off-by: Samuel Hawksby-Robinson <samuel@samyoul.com>
This commit is contained in:
Samuel Hawksby-Robinson 2020-07-19 15:06:58 +01:00 committed by Andrea Maria Piana
parent 961c00069b
commit 57319599de
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
4 changed files with 9 additions and 3 deletions

View File

@ -1,3 +0,0 @@
ALTER TABLE user_messages ADD COLUMN emoji_reaction_target VARCHAR;
ALTER TABLE user_messages ADD COLUMN emoji_reaction_type INT;
ALTER TABLE user_messages ADD COLUMN emoji_reaction_retraction_target VARCHAR;

View File

@ -0,0 +1 @@
DROP TABLE emoji_reactions;

View File

@ -0,0 +1,8 @@
CREATE TABLE IF NOT EXISTS emoji_reactions (
id VARCHAR PRIMARY KEY ON CONFLICT REPLACE,
clock_value INT NOT NULL,
source TEXT NOT NULL,
emoji_id INT NOT NULL,
message_id VARCHAR NOT NULL,
retracted INT DEFAULT 0
);