Add FCM device registration and Gitea bug reporter

This commit is contained in:
2026-09-15 01:01:08 +02:00
parent b2af866cf0
commit b96b1890d2
33 changed files with 1232 additions and 18 deletions
@@ -0,0 +1,13 @@
-- Short-lived deduplication/cooldown metadata only, never bug titles or bodies.
CREATE TABLE IF NOT EXISTS bug_report_submissions (
id UUID PRIMARY KEY,
user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE,
state VARCHAR(16) NOT NULL DEFAULT 'new'
CHECK (state IN ('new', 'sending', 'success', 'failed', 'unknown')),
issue_number INTEGER,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
submitted_at TIMESTAMP,
expires_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP + INTERVAL '24 hours'
);
CREATE INDEX IF NOT EXISTS idx_bug_report_submissions_user
ON bug_report_submissions(user_id, submitted_at);