-
Notifications
You must be signed in to change notification settings - Fork 92
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: add new notification columns to User
#2263
Conversation
User
name = 'User1726691862710' | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "user" ADD "followingEmail" boolean NOT NULL DEFAULT true`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just thinking is there any case where we want to consider false now?
I do think when someone turned off all emails for instance or all push this should be false... Maybe something to consider in the migration (should be a easy query)
From FE it should work the same.
Turning the main email off should turn off all sub emails immediatly.
CC: @capJavert fyi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, we can do once of UPDATE query or script but we need to check with product because they usually don't like emails off 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@omBratteng can you test/prepare the query on your end and we can run it once before we go live? (product confirmed it should act like Chris mentioned)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@capJavert do we only want to check for the Activity and Community updates, or also personalized digest?
Because when email notifications are "Off", all of them are off. But if you enable digest, it technically back on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the first one is fine for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For push notifications it's either on or it's not. So there we could just keep it on as default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably run it manually in batches. Once when this is merged, and once just as we go live to catch any changes that might've been done while UI wasn't in place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Batches yes, user table can block a lot of things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything else missing from the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easier to run a query to turn it off for 120k users, then a query to enable it for the other 870k that has either enabled
Some more tests need to be updated I think. |
075d82d
to
76b7380
Compare
Extends user table to add two new columns,
followingEmail
andfollowNotifications
AS-584