Add FCM device registration and Gitea bug reporter
This commit is contained in:
@@ -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);
|
||||
Reference in New Issue
Block a user