store: delete conflicting telegram_file rows
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user