feat: 添加短信验证码发送记录功能
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
CREATE TABLE sms_code_sends(
|
||||
id SERIAL8 PRIMARY KEY,
|
||||
phone varchar(20) NOT NULL,
|
||||
code varchar(20) NOT NULL,
|
||||
sent_at timestamp NOT NULL DEFAULT now(),
|
||||
expires_at timestamp NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX idx_sms_code_sends_phone ON sms_code_sends(phone);
|
||||
CREATE INDEX idx_sms_code_sends_sent_at ON sms_code_sends(sent_at);
|
||||
-- +goose StatementEnd
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
DROP TABLE sms_code_sends;
|
||||
-- +goose StatementEnd
|
||||
|
||||
Reference in New Issue
Block a user