Описание изменений
This commit is contained in:
13
backend/db/migrations/009_nonces_table.sql
Normal file
13
backend/db/migrations/009_nonces_table.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
CREATE TABLE IF NOT EXISTS nonces (
|
||||
id SERIAL PRIMARY KEY,
|
||||
identity_value VARCHAR(255) NOT NULL,
|
||||
nonce VARCHAR(255) NOT NULL,
|
||||
expires_at TIMESTAMP NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW()
|
||||
);
|
||||
|
||||
-- Индекс для быстрого поиска по identity_value
|
||||
CREATE INDEX IF NOT EXISTS idx_nonces_identity_value ON nonces(identity_value);
|
||||
|
||||
-- Индекс для очистки просроченных nonce
|
||||
CREATE INDEX IF NOT EXISTS idx_nonces_expires_at ON nonces(expires_at);
|
||||
Reference in New Issue
Block a user