feat: add intake reminders feature with email notifications and UI integration

This commit is contained in:
Daniel Volz
2025-12-21 09:18:03 +01:00
parent 2054fc0b56
commit f06904f8ae
9 changed files with 414 additions and 8 deletions
+1
View File
@@ -16,6 +16,7 @@ async function runMigrations() {
{ name: "expiry_date", sql: "ALTER TABLE medications ADD COLUMN expiry_date TEXT" },
{ name: "notes", sql: "ALTER TABLE medications ADD COLUMN notes TEXT" },
{ name: "generic_name", sql: "ALTER TABLE medications ADD COLUMN generic_name TEXT" },
{ name: "intake_reminders_enabled", sql: "ALTER TABLE medications ADD COLUMN intake_reminders_enabled INTEGER NOT NULL DEFAULT 0" },
];
for (const migration of migrations) {
@@ -0,0 +1,2 @@
-- Add intake_reminders_enabled column to medications table
ALTER TABLE medications ADD COLUMN intake_reminders_enabled INTEGER NOT NULL DEFAULT 0;
+2 -1
View File
@@ -6,6 +6,7 @@
{ "idx": 3, "version": 1, "when": 1734900000, "tag": "0003_add_image_url", "breakpoint": false },
{ "idx": 4, "version": 1, "when": 1735000000, "tag": "0004_add_expiry_date", "breakpoint": false },
{ "idx": 5, "version": 1, "when": 1735100000, "tag": "0005_add_notes", "breakpoint": false },
{ "idx": 6, "version": 1, "when": 1735200000, "tag": "0006_add_generic_name", "breakpoint": false }
{ "idx": 6, "version": 1, "when": 1735200000, "tag": "0006_add_generic_name", "breakpoint": false },
{ "idx": 7, "version": 1, "when": 1735300000, "tag": "0007_add_intake_reminders", "breakpoint": false }
]
}
+1
View File
@@ -27,6 +27,7 @@ export const medications = sqliteTable("medications", {
imageUrl: text("image_url"),
expiryDate: text("expiry_date"),
notes: text("notes"),
intakeRemindersEnabled: integer("intake_reminders_enabled", { mode: "boolean" }).notNull().default(false),
updatedAt: integer("updated_at", { mode: "timestamp" }).notNull().default(sql`CURRENT_TIMESTAMP`),
});