mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-06-04 03:51:48 +00:00
core: set via_group_link_uri for groups (#6137)
* core: set via_group_link_uri for groups * schema * plans * schema * add to type * plans, api
This commit is contained in:
@@ -14,6 +14,7 @@ import Simplex.Chat.Store.Postgres.Migrations.M20250704_groups_conn_link_prepare
|
||||
import Simplex.Chat.Store.Postgres.Migrations.M20250709_profile_short_descr
|
||||
import Simplex.Chat.Store.Postgres.Migrations.M20250721_indexes
|
||||
import Simplex.Chat.Store.Postgres.Migrations.M20250729_member_contact_requests
|
||||
import Simplex.Chat.Store.Postgres.Migrations.M20250801_via_group_link_uri
|
||||
import Simplex.Messaging.Agent.Store.Shared (Migration (..))
|
||||
|
||||
schemaMigrations :: [(String, Text, Maybe Text)]
|
||||
@@ -27,7 +28,8 @@ schemaMigrations =
|
||||
("20250704_groups_conn_link_prepared_connection", m20250704_groups_conn_link_prepared_connection, Just down_m20250704_groups_conn_link_prepared_connection),
|
||||
("20250709_profile_short_descr", m20250709_profile_short_descr, Just down_m20250709_profile_short_descr),
|
||||
("20250721_indexes", m20250721_indexes, Just down_m20250721_indexes),
|
||||
("20250729_member_contact_requests", m20250729_member_contact_requests, Just down_m20250729_member_contact_requests)
|
||||
("20250729_member_contact_requests", m20250729_member_contact_requests, Just down_m20250729_member_contact_requests),
|
||||
("20250801_via_group_link_uri", m20250801_via_group_link_uri, Just down_m20250801_via_group_link_uri)
|
||||
]
|
||||
|
||||
-- | The list of migrations in ascending order by date
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Store.Postgres.Migrations.M20250801_via_group_link_uri where
|
||||
|
||||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
import Text.RawString.QQ (r)
|
||||
|
||||
m20250801_via_group_link_uri :: Text
|
||||
m20250801_via_group_link_uri =
|
||||
T.pack
|
||||
[r|
|
||||
ALTER TABLE groups ADD COLUMN via_group_link_uri BYTEA;
|
||||
ALTER TABLE connections ADD COLUMN via_contact_uri BYTEA;
|
||||
|]
|
||||
|
||||
down_m20250801_via_group_link_uri :: Text
|
||||
down_m20250801_via_group_link_uri =
|
||||
T.pack
|
||||
[r|
|
||||
ALTER TABLE groups DROP COLUMN via_group_link_uri;
|
||||
ALTER TABLE connections DROP COLUMN via_contact_uri;
|
||||
|]
|
||||
@@ -303,7 +303,8 @@ CREATE TABLE test_chat_schema.connections (
|
||||
pq_rcv_enabled smallint,
|
||||
quota_err_counter bigint DEFAULT 0 NOT NULL,
|
||||
short_link_inv bytea,
|
||||
via_short_link_contact bytea
|
||||
via_short_link_contact bytea,
|
||||
via_contact_uri bytea
|
||||
);
|
||||
|
||||
|
||||
@@ -653,7 +654,8 @@ CREATE TABLE test_chat_schema.groups (
|
||||
conn_link_started_connection smallint DEFAULT 0 NOT NULL,
|
||||
welcome_shared_msg_id bytea,
|
||||
request_shared_msg_id bytea,
|
||||
conn_link_prepared_connection smallint DEFAULT 0 NOT NULL
|
||||
conn_link_prepared_connection smallint DEFAULT 0 NOT NULL,
|
||||
via_group_link_uri bytea
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user