mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-09 18:51:45 +00:00
chat: add simplex_name to contact_profiles and group_profiles
Adds nullable simplex_name TEXT column and partial UNIQUE (user_id, simplex_name) index to both contact_profiles and group_profiles tables. Distinct from contacts.simplex_name / groups.simplex_name (M20260603), which carry the user's locally-known label set by the prepare-via-name path; the new columns will carry the peer's broadcast claim received via XInfo / XGrpInfo (wired up in following commits).
This commit is contained in:
@@ -532,7 +532,8 @@ CREATE TABLE test_chat_schema.contact_profiles (
|
||||
preferences text,
|
||||
contact_link bytea,
|
||||
short_descr text,
|
||||
chat_peer_type text
|
||||
chat_peer_type text,
|
||||
simplex_name text
|
||||
);
|
||||
|
||||
|
||||
@@ -856,7 +857,8 @@ CREATE TABLE test_chat_schema.group_profiles (
|
||||
group_web_page text,
|
||||
group_domain text,
|
||||
domain_web_page bigint,
|
||||
allow_embedding bigint
|
||||
allow_embedding bigint,
|
||||
simplex_name text
|
||||
);
|
||||
|
||||
|
||||
@@ -2137,6 +2139,10 @@ CREATE INDEX idx_contact_profiles_contact_link ON test_chat_schema.contact_profi
|
||||
|
||||
|
||||
|
||||
CREATE UNIQUE INDEX idx_contact_profiles_simplex_name ON test_chat_schema.contact_profiles USING btree (user_id, simplex_name) WHERE (simplex_name IS NOT NULL);
|
||||
|
||||
|
||||
|
||||
CREATE INDEX idx_contact_profiles_user_id ON test_chat_schema.contact_profiles USING btree (user_id);
|
||||
|
||||
|
||||
@@ -2321,6 +2327,10 @@ CREATE INDEX idx_group_members_user_id_local_display_name ON test_chat_schema.gr
|
||||
|
||||
|
||||
|
||||
CREATE UNIQUE INDEX idx_group_profiles_simplex_name ON test_chat_schema.group_profiles USING btree (user_id, simplex_name) WHERE (simplex_name IS NOT NULL);
|
||||
|
||||
|
||||
|
||||
CREATE INDEX idx_group_profiles_user_id ON test_chat_schema.group_profiles USING btree (user_id);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user