feat: simplify mails and add reminders
This commit is contained in:
2
packages/db/src/migrations/0009_reminder_24h.sql
Normal file
2
packages/db/src/migrations/0009_reminder_24h.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Add sent_24h_at column to track whether the 24-hour-before reminder was sent
|
||||
ALTER TABLE `reminder` ADD `sent_24h_at` integer;
|
||||
@@ -6,6 +6,9 @@ export const reminder = sqliteTable(
|
||||
{
|
||||
id: text("id").primaryKey(), // UUID
|
||||
email: text("email").notNull(),
|
||||
/** Set when the 24-hours-before reminder has been sent. */
|
||||
sent24hAt: integer("sent_24h_at", { mode: "timestamp_ms" }),
|
||||
/** Set when the 1-hour-before reminder has been sent. */
|
||||
sentAt: integer("sent_at", { mode: "timestamp_ms" }),
|
||||
createdAt: integer("created_at", { mode: "timestamp_ms" })
|
||||
.default(sql`(cast(unixepoch('subsecond') * 1000 as integer))`)
|
||||
|
||||
Reference in New Issue
Block a user