feat(discovery): add rejected_discoveries sticky-reject table migration

This commit is contained in:
2026-04-18 07:17:21 +02:00
parent cddd0196c0
commit fa15810dbb
2 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1 @@
DROP TABLE IF EXISTS rejected_discoveries;

View File

@@ -0,0 +1,13 @@
CREATE TABLE rejected_discoveries (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
name_normalized text NOT NULL,
stadt text NOT NULL,
year int NOT NULL,
rejected_at timestamptz NOT NULL DEFAULT now(),
rejected_by uuid REFERENCES users(id) ON DELETE SET NULL,
reason text,
UNIQUE (name_normalized, stadt, year)
);
CREATE INDEX idx_rejected_discoveries_lookup
ON rejected_discoveries (name_normalized, stadt, year);