From b83b2107300b24e621fe430a947c408c50740665 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 26 Nov 2024 13:44:17 +0200 Subject: [PATCH] legacymigrate: fix room type and other user ID migration --- cmd/mautrix-twitter/legacymigrate.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/mautrix-twitter/legacymigrate.sql b/cmd/mautrix-twitter/legacymigrate.sql index 4b4ba37..118ac76 100644 --- a/cmd/mautrix-twitter/legacymigrate.sql +++ b/cmd/mautrix-twitter/legacymigrate.sql @@ -49,7 +49,7 @@ SELECT CAST(twid AS TEXT), -- id CASE WHEN receiver<>0 THEN CAST(receiver AS TEXT) ELSE '' END, -- receiver mxid, -- mxid - CASE WHEN conv_type <> 'ONE_TO_ONE' THEN CAST(other_user AS TEXT) END, -- other_user_id + CASE WHEN conv_type='ONE_TO_ONE' THEN CAST(other_user AS TEXT) END, -- other_user_id '', -- name '', -- topic '', -- avatar_id @@ -60,7 +60,7 @@ SELECT false, -- topic_set false, -- name_is_custom false, -- in_space - CASE WHEN conv_type <> 'GROUP_DM' THEN 'group_dm' ELSE 'dm' END, -- room_type + CASE WHEN conv_type='GROUP_DM' THEN 'group_dm' ELSE 'dm' END, -- room_type '{}' -- metadata FROM portal_old;