Add support for hiding broken caches

Deleting them is fairly tricky due to the append-only nature of the
database.

Signed-off-by: Graham <gpe@openrs2.org>
Graham 3 years ago
parent 80dda3f2dc
commit af918cf535
  1. 1
      archive/src/main/kotlin/org/openrs2/archive/cache/CacheExporter.kt
  2. 2
      archive/src/main/resources/org/openrs2/archive/migrations/V13__hidden_flag.sql

@ -182,6 +182,7 @@ public class CacheExporter @Inject constructor(
JOIN environments e ON e.id = v.environment_id
JOIN languages l ON l.id = v.language_id
LEFT JOIN cache_stats cs ON cs.scope_id = sc.id AND cs.cache_id = c.id
WHERE NOT c.hidden
GROUP BY sc.name, c.id, g.name, e.name, l.iso_code, cs.valid_indexes, cs.indexes, cs.valid_groups,
cs.groups, cs.valid_keys, cs.keys, cs.size, cs.blocks
) t

@ -0,0 +1,2 @@
-- @formatter:off
ALTER TABLE caches ADD COLUMN hidden BOOLEAN NOT NULL DEFAULT FALSE;
Loading…
Cancel
Save