This commit is contained in:
16
server-node/sql/schema/08_sms_auth_events.sql
Normal file
16
server-node/sql/schema/08_sms_auth_events.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user