From ea63769fe93443205f58c500edfcbd3070a37bef Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 7 Mar 2021 13:03:55 +0000 Subject: [PATCH] Add container IDs to the collisions view for debugging Signed-off-by: Graham --- .../main/resources/org/openrs2/archive/migrations/V1__init.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archive/src/main/resources/org/openrs2/archive/migrations/V1__init.sql b/archive/src/main/resources/org/openrs2/archive/migrations/V1__init.sql index 371b5bd3..cc6a49c8 100644 --- a/archive/src/main/resources/org/openrs2/archive/migrations/V1__init.sql +++ b/archive/src/main/resources/org/openrs2/archive/migrations/V1__init.sql @@ -216,7 +216,7 @@ LEFT JOIN ( CREATE UNIQUE INDEX ON master_index_stats (master_index_id); CREATE VIEW collisions (archive_id, group_id, crc32, truncated_version, containers) AS -SELECT g.archive_id, g.group_id, c.crc32, g.version & 65535 AS truncated_version, COUNT(DISTINCT c.id) +SELECT g.archive_id, g.group_id, c.crc32, g.version & 65535 AS truncated_version, array_agg(DISTINCT c.id ORDER BY c.id ASC) FROM groups g JOIN containers c ON c.id = g.container_id GROUP BY g.archive_id, g.group_id, c.crc32, truncated_version