feat(emails): add re-send for all emails, failed tab, and resend indicators
- Add resend_attempts and last_resent_at to email_logs schema and migrations - Add POST /api/emails/logs/:id/resend and emailService.resendFromLog - Add resendLog API and EmailLog.resendAttempts/lastResentAt - Add All/Failed sub-tabs, resend button for all emails, re-sent indicator in logs and detail modal Made-with: Cursor
This commit is contained in:
@@ -368,6 +368,13 @@ async function migrate() {
|
||||
)
|
||||
`);
|
||||
|
||||
try {
|
||||
await (db as any).run(sql`ALTER TABLE email_logs ADD COLUMN resend_attempts INTEGER NOT NULL DEFAULT 0`);
|
||||
} catch (e) { /* column may already exist */ }
|
||||
try {
|
||||
await (db as any).run(sql`ALTER TABLE email_logs ADD COLUMN last_resent_at TEXT`);
|
||||
} catch (e) { /* column may already exist */ }
|
||||
|
||||
await (db as any).run(sql`
|
||||
CREATE TABLE IF NOT EXISTS email_settings (
|
||||
id TEXT PRIMARY KEY,
|
||||
@@ -772,6 +779,13 @@ async function migrate() {
|
||||
)
|
||||
`);
|
||||
|
||||
try {
|
||||
await (db as any).execute(sql`ALTER TABLE email_logs ADD COLUMN resend_attempts INTEGER NOT NULL DEFAULT 0`);
|
||||
} catch (e) { /* column may already exist */ }
|
||||
try {
|
||||
await (db as any).execute(sql`ALTER TABLE email_logs ADD COLUMN last_resent_at TIMESTAMP`);
|
||||
} catch (e) { /* column may already exist */ }
|
||||
|
||||
await (db as any).execute(sql`
|
||||
CREATE TABLE IF NOT EXISTS email_settings (
|
||||
id UUID PRIMARY KEY,
|
||||
|
||||
Reference in New Issue
Block a user