Skip to content

Commit

Permalink
v2: fix more legacymigrate.sql issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Jun 26, 2024
1 parent 80e59d6 commit 29d248b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cmd/mautrix-signal-v2/legacymigrate.sql
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ INSERT INTO message (
SELECT
'', -- bridge_id
cast(sender AS TEXT) || '|' || timestamp, -- id
CAST(part_index AS TEXT), -- part_id
CASE WHEN part_index=0 THEN '' ELSE CAST(part_index AS TEXT) END, -- part_id
mxid,
signal_chat_id, -- room_id
CASE
Expand All @@ -85,10 +85,7 @@ SELECT
cast(sender AS TEXT), -- sender_id
timestamp * 1000000,
NULL, -- relates_to
-- only: postgres
'{}'::jsonb -- metadata
-- only: sqlite (line commented)
-- '{}'
'{}' -- metadata
FROM message_old;

INSERT INTO disappearing_message (
Expand Down

0 comments on commit 29d248b

Please sign in to comment.