Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: emails sent table migration #8528

Merged
merged 2 commits into from
Oct 25, 2024
Merged

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Oct 24, 2024

About the changes

Background: we need to send emails for productivity report every month. We need to guarantee at most once delivery semantics.

Solution: Create sent_emails table. There's a potential vector of change that involves more email types so I optimize for this use case.
Screenshot 2024-10-24 at 10 31 50

Proposed structure:

  • id is similar to trends ids YYYY-MM and indicates that we have already sent a report for 2024-10
  • type is the email type and it accommodates different email types
  • created_at is the exact date we sent out the email (useful for tracking if we sent out emails when we intend)
  • payload - so that we know what dynamic data was provided in the template (it allows re-sent capability in future and debugging)

Note: this PR will be merged once we used it in sample code that gives us feedback that the structure is solid.

Important files

Discussion points

Copy link

vercel bot commented Oct 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 25, 2024 7:50am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Oct 25, 2024 7:50am

Copy link
Contributor

github-actions bot commented Oct 24, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

@kwasniew kwasniew requested a review from Tymek October 24, 2024 08:47
@kwasniew kwasniew merged commit 5662fe7 into main Oct 25, 2024
12 checks passed
@kwasniew kwasniew deleted the sent-emails-table-migration branch October 25, 2024 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants