13 lines
485 B
SQL
13 lines
485 B
SQL
CREATE TABLE IF NOT EXISTS captchas (
|
|
id UUID DEFAULT uuid_generate_v4(),
|
|
token TEXT NOT NULL,
|
|
security_code TEXT NOT NULL,
|
|
expires_at BIGINT NOT NULL DEFAULT (extract(epoch from now()) * 1000),
|
|
created_at BIGINT NOT NULL DEFAULT (extract(epoch from now()) * 1000),
|
|
|
|
PRIMARY KEY (id)
|
|
);
|
|
|
|
-- index
|
|
CREATE UNIQUE INDEX uidx_captchas_token ON captchas (token);
|