Files
Genarrative/server-node/sql/schema/08_sms_auth_events.sql
victo 3d6f31433a
Some checks failed
CI / verify (push) Has been cancelled
update: 表改动 主页改动
2026-04-14 18:58:33 +08:00

17 lines
452 B
SQL

CREATE TABLE IF NOT EXISTS sms_auth_events (
id TEXT PRIMARY KEY,
phone_number TEXT NOT NULL,
scene TEXT NOT NULL,
action TEXT NOT NULL,
success BOOLEAN NOT NULL,
ip TEXT,
user_agent TEXT,
created_at TEXT NOT NULL
);
CREATE INDEX IF NOT EXISTS sms_auth_events_phone_created_idx
ON sms_auth_events (phone_number, created_at DESC);
CREATE INDEX IF NOT EXISTS sms_auth_events_ip_created_idx
ON sms_auth_events (ip, created_at DESC);