From f712904dab95a3d52bfb21bf7e0e4a925b231fee Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Fri, 16 Sep 2022 18:08:37 +0100 Subject: Add a comment explaining why device_id is NULLable --- synapse/storage/schema/main/delta/73/03pusher_device_id.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/synapse/storage/schema/main/delta/73/03pusher_device_id.sql b/synapse/storage/schema/main/delta/73/03pusher_device_id.sql index 442f0abb15..1b4ffbeebe 100644 --- a/synapse/storage/schema/main/delta/73/03pusher_device_id.sql +++ b/synapse/storage/schema/main/delta/73/03pusher_device_id.sql @@ -13,4 +13,8 @@ * limitations under the License. */ +-- Add a device_id column to track the device ID that created the pusher. It's NULLable +-- on purpose, because a) it might not be possible to track down the device that created +-- old pushers (pushers.access_token and access_tokens.device_id are both NULLable), and +-- b) access tokens retrieved via the admin API don't have a device associated to them. ALTER TABLE pushers ADD COLUMN device_id TEXT; \ No newline at end of file -- cgit 1.5.1