fixed connection string in configs
Build and Deploy / build-and-deploy (push) Successful in 58s

This commit is contained in:
2026-05-23 14:49:15 +03:00
parent 0bedc8d508
commit 11f4b9c921
20 changed files with 35 additions and 9 deletions
@@ -0,0 +1,17 @@
CREATE UNLOGGED TABLE otp
(
user_id BIGINT NOT NULL,
otp TEXT NOT NULL,
expired_at TIMESTAMP NOT NULL,
FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE
);
CREATE INDEX idx_otp_user_id ON otp (user_id);
CREATE INDEX idx_otp_expired_at ON otp (expired_at);
SELECT cron.schedule(
'cleanup-expired-otp',
'*/10 * * * *',
$$DELETE FROM otp WHERE expired_at <= NOW()$$
);