Skip to content

Commit

Permalink
legacymigrate: fix room type and other user ID migration
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Nov 26, 2024
1 parent 80a44b1 commit b83b210
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/mautrix-twitter/legacymigrate.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;

Expand Down

0 comments on commit b83b210

Please sign in to comment.