store: delete conflicting telegram_file rows

This commit is contained in:
Tulir Asokan
2026-03-29 21:38:18 +03:00
parent e68ef24657
commit 6d085f477e
@@ -1,3 +1,4 @@
-- v7 (compatible with v2+): Add index and fix values in telegram_file
DELETE FROM telegram_file tf1 WHERE id LIKE '%-' AND EXISTS(SELECT 1 FROM telegram_file tf2 WHERE tf2.id=REPLACE(tf1.id, '-', ''));
UPDATE telegram_file SET id=REPLACE(id, '-', '') WHERE id LIKE '%-';
CREATE INDEX telegram_file_mxc_idx ON telegram_file (mxc);