From 3d6f1e85792b21e1bac642f54dd936a716f142f5 Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Wed, 25 Mar 2026 10:01:43 +0000 Subject: [PATCH] core: fix downgrade from channels/relays (#6706) --- .../Chat/Store/Postgres/Migrations/M20260222_chat_relays.hs | 2 ++ .../Chat/Store/SQLite/Migrations/M20260222_chat_relays.hs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Simplex/Chat/Store/Postgres/Migrations/M20260222_chat_relays.hs b/src/Simplex/Chat/Store/Postgres/Migrations/M20260222_chat_relays.hs index 9c78fb595c..a504e7f1d8 100644 --- a/src/Simplex/Chat/Store/Postgres/Migrations/M20260222_chat_relays.hs +++ b/src/Simplex/Chat/Store/Postgres/Migrations/M20260222_chat_relays.hs @@ -75,6 +75,8 @@ down_m20260222_chat_relays :: Text down_m20260222_chat_relays = T.pack [r| +UPDATE group_members SET member_role = 'observer' WHERE member_role = 'relay'; + ALTER TABLE users DROP COLUMN is_user_chat_relay; ALTER TABLE groups diff --git a/src/Simplex/Chat/Store/SQLite/Migrations/M20260222_chat_relays.hs b/src/Simplex/Chat/Store/SQLite/Migrations/M20260222_chat_relays.hs index cc3706081a..766921858f 100644 --- a/src/Simplex/Chat/Store/SQLite/Migrations/M20260222_chat_relays.hs +++ b/src/Simplex/Chat/Store/SQLite/Migrations/M20260222_chat_relays.hs @@ -86,6 +86,8 @@ ALTER TABLE chat_items ADD COLUMN msg_signed TEXT; down_m20260222_chat_relays :: Query down_m20260222_chat_relays = [sql| +UPDATE group_members SET member_role = 'observer' WHERE member_role = 'relay'; + ALTER TABLE users DROP COLUMN is_user_chat_relay; ALTER TABLE groups DROP COLUMN use_relays;