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

MNTOR-1800: Part 1 - new table for subscriber email preferences #4972

Merged
merged 13 commits into from
Sep 5, 2024

Conversation

mansaj
Copy link
Collaborator

@mansaj mansaj commented Aug 22, 2024

References:

Jira: MNTOR-3583

Description

The work to migrate email preferences to a new table need to be done in a few steps:

  1. create the table
  2. handle migration of the data from old table (subscribers) to this new table.
  3. Change the business logic to fetch from this new table / update new table

Checklist (Definition of Done)

  • Localization strings (if needed) have been added.
  • Commits in this PR are minimal and have descriptive commit messages.
  • I've added or updated the relevant sections in readme and/or code comments
  • I've added a unit test to test for potential regressions of this bug.
  • If this PR implements a feature flag or experimentation, the Ship Behind Feature Flag status in Jira has been set
  • Product Owner accepted the User Story (demo of functionality completed) or waived the privilege.
  • All acceptance criteria are met.
  • Jira ticket has been updated (if needed) to match changes made during the development process.
  • Jira ticket has been updated (if needed) with suggestions for QA when this PR is deployed to stage.

@mansaj mansaj requested a review from rhelmer August 22, 2024 21:56
Copy link

src/knex-tables.d.ts Outdated Show resolved Hide resolved
Comment on lines 10 to 12
table.boolean('instant_breach_alert').defaultTo(true);
table.boolean('all_emails_to_primary').defaultTo(true);
table.boolean('monthly_monitor_report').defaultTo(true);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recall reading (but can't find) the advice to instead make this a nullable datetime column *_disabled_at, would that make sense here? It's not a table that's read or written to particularly often I don't think, so not too much of a load, but would e.g. allow us to notice weird unsubscription patterns, and/or correlate unsubscription spikes with certain events? (Alternatively, simple Glean metrics might be fine too.)

@mansaj mansaj merged commit cb4ea8b into main Sep 5, 2024
15 checks passed
@mansaj mansaj deleted the MNTOR-1800 branch September 5, 2024 15:45
Copy link

github-actions bot commented Sep 5, 2024

Cleanup completed - database 'blurts-server-pr-4972' destroyed, cloud run service 'blurts-server-pr-4972' destroyed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants