mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-19 01:12:17 +03:00
16 lines
469 B
PL/PgSQL
16 lines
469 B
PL/PgSQL
PRAGMA foreign_keys=OFF;
|
|
BEGIN;
|
|
ALTER TABLE oidc_clients ADD COLUMN requires_reauthentication BOOLEAN NOT NULL DEFAULT FALSE;
|
|
|
|
CREATE TABLE reauthentication_tokens (
|
|
id TEXT PRIMARY KEY,
|
|
created_at DATETIME NOT NULL,
|
|
token TEXT NOT NULL UNIQUE,
|
|
expires_at INTEGER NOT NULL,
|
|
user_id TEXT NOT NULL REFERENCES users ON DELETE CASCADE
|
|
);
|
|
|
|
CREATE INDEX idx_reauthentication_tokens_token ON reauthentication_tokens(token);
|
|
COMMIT;
|
|
PRAGMA foreign_keys=ON;
|