core: member relations vector migration; set index in group for members; rework logic for avoiding duplicate introductions (#6445)

This commit is contained in:
spaced4ndy
2025-11-19 15:25:09 +00:00
committed by GitHub
parent 1101588c8b
commit a5c6ea8e5d
17 changed files with 534 additions and 287 deletions
@@ -706,7 +706,9 @@ CREATE TABLE test_chat_schema.group_members (
support_chat_items_mentions bigint DEFAULT 0 NOT NULL,
support_chat_last_msg_from_member_ts timestamp with time zone,
member_xcontact_id bytea,
member_welcome_shared_msg_id bytea
member_welcome_shared_msg_id bytea,
index_in_group bigint DEFAULT 0 NOT NULL,
member_relations_vector bytea
);
@@ -805,7 +807,8 @@ CREATE TABLE test_chat_schema.groups (
request_shared_msg_id bytea,
conn_link_prepared_connection smallint DEFAULT 0 NOT NULL,
via_group_link_uri bytea,
summary_current_members_count bigint DEFAULT 0 NOT NULL
summary_current_members_count bigint DEFAULT 0 NOT NULL,
member_index bigint DEFAULT 0 NOT NULL
);
@@ -2081,6 +2084,10 @@ CREATE INDEX idx_group_members_group_id ON test_chat_schema.group_members USING
CREATE UNIQUE INDEX idx_group_members_group_id_index_in_group ON test_chat_schema.group_members USING btree (group_id, index_in_group);
CREATE INDEX idx_group_members_invited_by ON test_chat_schema.group_members USING btree (invited_by);