Add full sortof codebase: API, drain workers, frontend, schema, specs

This commit is contained in:
2026-05-04 03:27:54 +00:00
parent acda2c90f8
commit 55d3794bfb
43 changed files with 13375 additions and 53 deletions

View File

@@ -0,0 +1,13 @@
-- Records every mod_id eviction the worker performs (one wsid claiming a mod_id
-- previously held by another). Used by /api/sort to warn the user when their
-- input includes multiple wsids that declare the same mod_id (PZ silently
-- loads only one; the others' folders end up dead weight on the server).
CREATE TABLE IF NOT EXISTS mod_id_conflicts (
mod_id TEXT NOT NULL,
evicting_wsid TEXT NOT NULL,
evicted_wsid TEXT NOT NULL,
recorded_at TIMESTAMPTZ NOT NULL DEFAULT now(),
PRIMARY KEY (mod_id, evicting_wsid, evicted_wsid)
);
CREATE INDEX IF NOT EXISTS mod_id_conflicts_evicted_idx ON mod_id_conflicts (evicted_wsid);
CREATE INDEX IF NOT EXISTS mod_id_conflicts_evicting_idx ON mod_id_conflicts (evicting_wsid);