summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-11-24 16:20:41 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2021-11-24 16:20:41 +0000
commit7cf6ad91972f230dbd59caab25f5edc9445cce44 (patch)
tree3bf82524c66bd476c0f9bd586c06131eb618fd89
parentAdd some FIXME comments (diff)
downloadsynapse-7cf6ad91972f230dbd59caab25f5edc9445cce44.tar.xz
Add comment on why we don't NOT NULL to_device_stream_id
-rw-r--r--synapse/storage/schema/main/delta/65/06_msc2409_add_device_id_appservice_stream_type.sql5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/storage/schema/main/delta/65/06_msc2409_add_device_id_appservice_stream_type.sql b/synapse/storage/schema/main/delta/65/06_msc2409_add_device_id_appservice_stream_type.sql
index 3ad9780d1e..7b40241282 100644
--- a/synapse/storage/schema/main/delta/65/06_msc2409_add_device_id_appservice_stream_type.sql
+++ b/synapse/storage/schema/main/delta/65/06_msc2409_add_device_id_appservice_stream_type.sql
@@ -15,4 +15,9 @@
 
 -- Add a column to track what to_device stream id that this application
 -- service has been caught up to.
+
+-- We explicitly don't set this field as "NOT NULL", as having NULL as a possible
+-- state is useful for determining if we've ever sent traffic for a stream type
+-- to an appservice. See https://github.com/matrix-org/synapse/issues/10836 for
+-- one way this can be used.
 ALTER TABLE application_services_state ADD COLUMN to_device_stream_id BIGINT;
\ No newline at end of file