mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-23 18:09:27 -05:00
Remove duplicate rows
This commit is contained in:
parent
c5365dee56
commit
93937b2b31
9
synapse/storage/schema/delta/16/remove_duplicates.sql
Normal file
9
synapse/storage/schema/delta/16/remove_duplicates.sql
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
DELETE FROM event_to_state_groups WHERE state_group not in (
|
||||||
|
SELECT MAX(state_group) FROM event_to_state_groups GROUP BY event_id
|
||||||
|
);
|
||||||
|
|
||||||
|
DELETE FROM event_to_state_groups WHERE rowid not in (
|
||||||
|
SELECT MIN(rowid) FROM event_to_state_groups GROUP BY event_id
|
||||||
|
);
|
Loading…
Reference in New Issue
Block a user