Add full sortof codebase: API, drain workers, frontend, schema, specs
This commit is contained in:
13
init/03_mod_id_conflicts.sql
Normal file
13
init/03_mod_id_conflicts.sql
Normal 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);
|
||||
Reference in New Issue
Block a user