feat: impl auth challenges interfaces for pg

This commit is contained in:
Aravinth Manivannan
2023-06-13 19:24:19 +05:30
parent 0cfffed52e
commit e7b01a5b06
5 changed files with 168 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
CREATE TABLE IF NOT EXISTS mcaptcha_challenge_reason (
id SERIAL PRIMARY KEY NOT NULL,
name VARCHAR(40) NOT NULL UNIQUE
);
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,
challenge_id varchar(40) NOT NULL UNIQUE,
received timestamptz NOT NULL DEFAULT now()
);