fix: associate challenges with usernames

This commit is contained in:
Aravinth Manivannan
2023-06-17 16:13:48 +05:30
parent e7b01a5b06
commit 6f029d2945
10 changed files with 193 additions and 111 deletions

View File

@@ -6,6 +6,7 @@ CREATE TABLE IF NOT EXISTS mcaptcha_challenge_reason (
CREATE TABLE IF NOT EXISTS mcaptcha_challenge (
id SERIAL PRIMARY KEY NOT NULL,
reason INTEGER NOT NULL references mcaptcha_challenge_reason(ID) ON DELETE CASCADE,
user_id INTEGER NOT NULL references mcaptcha_users(ID) ON DELETE CASCADE,
challenge_id varchar(40) NOT NULL UNIQUE,
received timestamptz NOT NULL DEFAULT now()
);