diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2020-09-04 14:14:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 14:14:22 +0100 |
commit | 041ee971c9b029dcad0dbfb55d4b9da5711d4cb0 (patch) | |
tree | d3a48e8b562c612f2ac267d9b5308982ef307226 /synapse/storage/databases/main | |
parent | Fix a regression from calling read_templates. (#8252) (diff) | |
download | synapse-041ee971c9b029dcad0dbfb55d4b9da5711d4cb0.tar.xz |
Unread counts fixes (#8254)
* Fixup `ALTER TABLE` database queries Make the new columns nullable, because doing otherwise can wedge a server with a big database, as setting a default value rewrites the table. * Switch back to using the notifications count in the push badge Clients are likely to be confused if we send a push but the badge count is the unread messages one, and not the notifications one. * Changelog
Diffstat (limited to 'synapse/storage/databases/main')
-rw-r--r-- | synapse/storage/databases/main/schema/delta/58/15unread_count.sql | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/databases/main/schema/delta/58/15unread_count.sql b/synapse/storage/databases/main/schema/delta/58/15unread_count.sql index b451e8663a..317fba8a5d 100644 --- a/synapse/storage/databases/main/schema/delta/58/15unread_count.sql +++ b/synapse/storage/databases/main/schema/delta/58/15unread_count.sql @@ -19,8 +19,8 @@ -- Add columns to event_push_actions and event_push_actions_staging to track unread -- messages and calculate unread counts. -ALTER TABLE event_push_actions_staging ADD COLUMN unread SMALLINT NOT NULL DEFAULT 0; -ALTER TABLE event_push_actions ADD COLUMN unread SMALLINT NOT NULL DEFAULT 0; +ALTER TABLE event_push_actions_staging ADD COLUMN unread SMALLINT; +ALTER TABLE event_push_actions ADD COLUMN unread SMALLINT; -- Add column to event_push_summary -ALTER TABLE event_push_summary ADD COLUMN unread_count BIGINT NOT NULL DEFAULT 0; \ No newline at end of file +ALTER TABLE event_push_summary ADD COLUMN unread_count BIGINT; \ No newline at end of file |