Add msgdata SQL template

Co-authored-by: Elias Schriefer
This commit is contained in:
Erik Foris 2021-10-25 17:17:10 +02:00
parent 3dfa8a1474
commit c52160ab69

View File

@ -0,0 +1,11 @@
-- msgdata_template definition
-- TODO Add IF NOT EXISTS to prevent panics
CREATE TABLE msgdata_{chat_id} (
msg_id TEXT NOT NULL
timestamp INTEGER NOT NULL,
sender_id TEXT NOT NULL,
msg_type INTEGER NOT NULL,
content TEXT,
hide_for TEXT,
CONSTRAINT PK_msgdata_{chat_id} PRIMARY KEY (msg_id, timestamp)
);