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,20 @@
-- Community-reported broken mods. Each (workshop_id, version) is unique;
-- re-submitting the same pair upserts (refreshes updated_at) while
-- preserving accumulated votes. ORDER BY updated_at DESC drives the
-- list view, so a re-report bubbles the entry back to the top with
-- previous up/down counts intact.
CREATE TABLE IF NOT EXISTS broken_mod_reports (
id BIGSERIAL PRIMARY KEY,
workshop_id TEXT NOT NULL,
mod_name TEXT,
version TEXT NOT NULL,
upvotes INTEGER NOT NULL DEFAULT 0,
downvotes INTEGER NOT NULL DEFAULT 0,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
UNIQUE (workshop_id, version)
);
CREATE INDEX IF NOT EXISTS broken_mod_reports_updated_idx
ON broken_mod_reports (updated_at DESC);
CREATE INDEX IF NOT EXISTS broken_mod_reports_wsid_idx
ON broken_mod_reports (workshop_id);