diff options
Diffstat (limited to 'migrations/035_oauth_token_errors.sql')
| -rw-r--r-- | migrations/035_oauth_token_errors.sql | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/migrations/035_oauth_token_errors.sql b/migrations/035_oauth_token_errors.sql new file mode 100644 index 0000000..c0100c0 --- /dev/null +++ b/migrations/035_oauth_token_errors.sql @@ -0,0 +1,14 @@ +-- Record why an OAuth token stopped working. +-- +-- A stored token row was treated as "connected", full stop. When the refresh +-- token itself goes bad — Google answers invalid_grant, which happens when it +-- is revoked, superseded, or (for an OAuth client still in Testing publishing +-- status) simply older than seven days — settings still showed Google Tasks as +-- connected while every fetch failed in the background. +-- +-- Persisting the failure lets settings say "reconnect" instead of "connected", +-- which is the difference between a five-second fix and not knowing anything +-- is wrong. Cleared on the next successful refresh. + +ALTER TABLE oauth_tokens ADD COLUMN last_error TEXT; +ALTER TABLE oauth_tokens ADD COLUMN last_error_at DATETIME; |
