Files
mostlymatter/db/migrations/postgres/000091_create_post_reminder.up.sql
Agniva De Sarker 20cb042362 Hackathon: Post Reminders (#20555)
This PR adds the post reminder backend work.

We add a new API endpoint via which a user can set a reminder for a post. An ephemeral message will be sent down the line to let the user know about the action. And then after the time is over, the system admin bot will send a DM message to the user about the reminder post.
2022-07-26 16:12:56 +05:30

8 строки
254 B
SQL

CREATE TABLE IF NOT EXISTS postreminders (
postid varchar(26) NOT NULL,
userid varchar(26) NOT NULL,
targettime bigint,
PRIMARY KEY (postid, userid)
);
CREATE INDEX IF NOT EXISTS idx_postreminders_targettime ON postreminders(targettime);