Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 1 | -- Cleaer all bouncing email flags for bounces in the last seven days. |
| 2 | -- Accounts that have invalid email addresses will be detected again |
| 3 | -- as soon as one email is sent to that address. |
| 4 | |
| 5 | UPDATE User |
| 6 | SET email_bounce_timestamp = NULL |
| 7 | WHERE email_bounce_timestamp > UNIX_TIMESTAMP() - 7 * 24 * 60 * 60 |
| 8 | LIMIT 1000; |
| 9 | |
| 10 | -- Look at the result, you may want to run it again if 1000 rows were |
| 11 | -- updated because that means that there were more than that many such |
| 12 | -- rows to start. |