mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-12-01 09:24:46 +00:00
10 lines
437 B
SQL
10 lines
437 B
SQL
CREATE TABLE IF NOT EXISTS password_resets (
|
|
id TEXT PRIMARY KEY,
|
|
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
|
token_hash TEXT NOT NULL UNIQUE,
|
|
created_at INTEGER NOT NULL,
|
|
expires_at INTEGER NOT NULL,
|
|
used_at INTEGER
|
|
);
|
|
CREATE INDEX IF NOT EXISTS idx_password_resets_user ON password_resets(user_id);
|
|
CREATE INDEX IF NOT EXISTS idx_password_resets_expiry ON password_resets(expires_at);
|