Skip to content

Commit c2d701e

Browse files
committed
legacymigrate: ignore media backfill rows with null media key
1 parent 32863de commit c2d701e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/mautrix-whatsapp/legacymigrate.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,10 @@ SELECT
265265
event_id,
266266
media_key,
267267
status,
268-
error
268+
COALESCE(error, '')
269269
FROM media_backfill_requests_old
270270
LEFT JOIN user_login ON user_login.user_mxid = media_backfill_requests_old.user_mxid
271-
WHERE user_login.id IS NOT NULL;
271+
WHERE user_login.id IS NOT NULL AND media_key IS NOT NULL AND status IS NOT NULL;
272272

273273
DROP TABLE backfill_queue_old;
274274
DROP TABLE backfill_state_old;

0 commit comments

Comments
 (0)