core: save CIContent tag in chat_items table (#3555)

This commit is contained in:
spaced4ndy
2023-12-14 17:08:40 +04:00
committed by GitHub
parent 73130bf321
commit 8cec5428ee
6 changed files with 58 additions and 6 deletions
@@ -0,0 +1,18 @@
{-# LANGUAGE QuasiQuotes #-}
module Simplex.Chat.Migrations.M20231214_item_content_tag where
import Database.SQLite.Simple (Query)
import Database.SQLite.Simple.QQ (sql)
m20231214_item_content_tag :: Query
m20231214_item_content_tag =
[sql|
ALTER TABLE chat_items ADD COLUMN item_content_tag TEXT;
|]
down_m20231214_item_content_tag :: Query
down_m20231214_item_content_tag =
[sql|
ALTER TABLE chat_items DROP COLUMN item_content_tag;
|]
+2 -1
View File
@@ -379,7 +379,8 @@ CREATE TABLE chat_items(
item_live INTEGER,
item_deleted_by_group_member_id INTEGER REFERENCES group_members ON DELETE SET NULL,
item_deleted_ts TEXT,
forwarded_by_group_member_id INTEGER REFERENCES group_members ON DELETE SET NULL
forwarded_by_group_member_id INTEGER REFERENCES group_members ON DELETE SET NULL,
item_content_tag TEXT
);
CREATE TABLE chat_item_messages(
chat_item_id INTEGER NOT NULL REFERENCES chat_items ON DELETE CASCADE,