From c52160ab69bf78e77a9aa5c7232cdccf791605b9 Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 25 Oct 2021 17:17:10 +0200 Subject: [PATCH] Add msgdata SQL template Co-authored-by: Elias Schriefer --- src/sqlite/msgdata_template.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/sqlite/msgdata_template.sql diff --git a/src/sqlite/msgdata_template.sql b/src/sqlite/msgdata_template.sql new file mode 100644 index 0000000..69fe89b --- /dev/null +++ b/src/sqlite/msgdata_template.sql @@ -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) +); \ No newline at end of file