summaryrefslogtreecommitdiff
path: root/internal/storage/migrations/sqlite/V0015.TOTPEnhance.up.sql
blob: 359a77ac556d588dcff5a192bb893dd538de755e (plain)
1
2
3
4
5
6
7
8
CREATE TABLE IF NOT EXISTS totp_history (
    id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    username VARCHAR(100) NOT NULL,
    step CHAR(64) NOT NULL
);

CREATE UNIQUE INDEX totp_history_lookup_key ON totp_history (username, step);